42 #ifndef TEUCHOS_ASSERT_HPP
43 #define TEUCHOS_ASSERT_HPP
55 #define TEUCHOS_ASSERT(assertion_test) TEUCHOS_TEST_FOR_EXCEPT(!(assertion_test))
62 #define TEUCHOS_DEBUG_ASSERT(assertion_test) TEUCHOS_ASSERT(assertion_test)
64 #define TEUCHOS_DEBUG_ASSERT(assertion_test)
82 #define TEUCHOS_ASSERT_IN_RANGE_UPPER_EXCLUSIVE( index, lower_inclusive, upper_exclusive ) \
84 TEUCHOS_TEST_FOR_EXCEPTION( \
85 !( (lower_inclusive) <= (index) && (index) < (upper_exclusive) ), \
87 "Error, the index " #index " = " << (index) << " does not fall in the range" \
88 "["<<(lower_inclusive)<<","<<(upper_exclusive)<<")!" ); \
105 #define TEUCHOS_ASSERT_EQUALITY( val1, val2 ) \
107 TEUCHOS_TEST_FOR_EXCEPTION( \
108 (val1) != (val2), std::out_of_range, \
109 "Error, (" #val1 " = " << (val1) << ") != (" #val2 " = " << (val2) << ")!" ); \
126 #define TEUCHOS_ASSERT_INEQUALITY( val1, comp, val2 ) \
128 TEUCHOS_TEST_FOR_EXCEPTION( \
129 !( (val1) comp (val2) ), std::out_of_range, \
130 "Error, (" #val1 " = " << (val1) << ") " \
131 #comp " (" #val2 " = " << (val2) << ")! FAILED!" ); \
135 #endif // TEUCHOS_ASSERT_HPP
Standard test and throw macros.