53 typedef Teuchos::Ordinal Ordinal;
58 ECHO(Range1D rng(0,0));
72 ECHO(Range1D rng(1,2));
96 TEST_ASSERT(rng.in_range(std::numeric_limits<Ordinal>::max()-1));
97 TEST_ASSERT(!rng.in_range(std::numeric_limits<Ordinal>::max()));
103 ECHO(Range1D rng(Range1D::INVALID));
116 ECHO(Range1D rng(0,-1));
129 ECHO(Range1D rng(1,0));
142 ECHO(Range1D rng(4,3));
156 ECHO(Range1D rng1(0,1));
160 ECHO(Range1D rng2(0,1));
163 ECHO(Range1D rng3(0,2));
166 ECHO(Range1D rng4(1,2));
169 ECHO(Range1D rng5 = rng4 - 1);
177 ECHO(Range1D rng1(4,6));
193 ECHO(Range1D rng2 = Range1D(2,3) + 4);
197 ECHO(Range1D rng2b = 4 + Range1D(2,3));
201 ECHO(Range1D rng3 = Range1D(4,5) - 2);
205 ECHO(Range1D rng4 = Range1D(4,4) - 4);
209 ECHO(Range1D rng5 = Range1D(4,4) + (-4));
219 TEST_THROW(Range1D(-1,-1), std::out_of_range);
224 TEST_THROW(Range1D(0,0)-1, std::out_of_range);
225 TEST_THROW(Range1D(0,0)+(-1), std::out_of_range);
228 #endif // TEUCHOS_DEBUG
#define TEST_INEQUALITY(v1, v2)
Assert the inequality of v1 and v2.
#define TEST_ASSERT(v1)
Assert the given statement is true.
Subregion Index Range Class.
#define ECHO(statement)
Echo the given statement before it is executed.
#define TEST_EQUALITY(v1, v2)
Assert the equality of v1 and v2.
#define TEST_THROW(code, ExceptType)
Assert that the statement 'code' throws the exception 'ExceptType' (otherwise the test fails)...
#define TEUCHOS_UNIT_TEST(TEST_GROUP, TEST_NAME)
Macro for defining a (non-templated) unit test.
#define TEST_EQUALITY_CONST(v1, v2)
Assert the equality of v1 and constant v2.
Definition of Teuchos::as, for conversions between types.