25 "n", &n,
"Number of elements in the vectors" );
30 std::vector<T> generatevector(
const int n_in)
33 std::vector<T> a(n_in);
34 for(
int i = 0; i < n_in; ++i )
55 typedef typename std::vector<T>::size_type size_type;
69 out <<
"\nTest that a[i] == i ... ";
70 vector<T> a = generatevector<T>(
n);;
71 bool local_success =
true;
72 for(
int i = 0; i <
n; ++i ) {
75 if (local_success) out <<
"passed\n";
84 out <<
"\nTest that a.at(i) == i ...\n";
85 vector<T> a = generatevector<T>(
n);;
86 bool local_success =
true;
87 for(
int i = 0; i <
n; ++i ) {
90 if (local_success) out <<
"passed\n";
100 #define UNIT_TEST_GROUP( T ) \
101 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( vector, defaultConstruct, T ) \
102 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( vector, sizedConstruct, T ) \
103 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( vector, operatorBracket, T ) \
104 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( vector, constAt, T )
#define UNIT_TEST_GROUP(T)
static CommandLineProcessor & getCLP()
Return the CLP to add options to.
#define TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL(TEST_GROUP, TEST_NAME, TYPE)
Macro for defining a templated unit test with one template parameter.
#define TEST_EQUALITY(v1, v2)
Assert the equality of v1 and v2.
#define TEST_COMPARE(v1, comp, v2)
Assert that v1 comp v2 (where comp = '==', '>=", "!=", etc).
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
void setOption(const char option_true[], const char option_false[], bool *option_val, const char documentation[]=NULL)
Set a boolean option.
#define TEST_EQUALITY_CONST(v1, v2)
Assert the equality of v1 and constant v2.
TypeTo as(const TypeFrom &t)
Convert from one value type to another.
Templated array class derived from the STL std::vector.
#define TEUCHOS_TEST_EQUALITY(v1, v2, out, success)
Test that two values are equal.
#define TEST_ARRAY_ELE_EQUALITY(a, i, val)
Assert that a[i] == val.
#define TEST_COMPARE_CONST(v1, comp, v2)
Assert that v1 comp v2 (where comp = '==', '>=", "!=", etc) where the second object v2 is printed as ...
Definition of Teuchos::as, for conversions between types.