19 typedef Teuchos::Ordinal Ordinal;
24 ECHO(Range1D rng(0,0));
38 ECHO(Range1D rng(1,2));
62 TEST_ASSERT(rng.in_range(std::numeric_limits<Ordinal>::max()-1));
63 TEST_ASSERT(!rng.in_range(std::numeric_limits<Ordinal>::max()));
69 ECHO(Range1D rng(Range1D::INVALID));
82 ECHO(Range1D rng(0,-1));
95 ECHO(Range1D rng(1,0));
108 ECHO(Range1D rng(4,3));
122 ECHO(Range1D rng1(0,1));
126 ECHO(Range1D rng2(0,1));
129 ECHO(Range1D rng3(0,2));
132 ECHO(Range1D rng4(1,2));
135 ECHO(Range1D rng5 = rng4 - 1);
143 ECHO(Range1D rng1(4,6));
159 ECHO(Range1D rng2 = Range1D(2,3) + 4);
163 ECHO(Range1D rng2b = 4 + Range1D(2,3));
167 ECHO(Range1D rng3 = Range1D(4,5) - 2);
171 ECHO(Range1D rng4 = Range1D(4,4) - 4);
175 ECHO(Range1D rng5 = Range1D(4,4) + (-4));
185 TEST_THROW(Range1D(-1,-1), std::out_of_range);
190 TEST_THROW(Range1D(0,0)-1, std::out_of_range);
191 TEST_THROW(Range1D(0,0)+(-1), std::out_of_range);
194 #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.