10#ifndef TEUCHOS_LOCAL_TESTING_HELPERS_HPP
11#define TEUCHOS_LOCAL_TESTING_HELPERS_HPP
31#define ECHO( statement ) \
32 TEUCHOS_ECHO( statement, out )
39#define TEST_ASSERT( v1 ) \
40 TEUCHOS_TEST_ASSERT( v1, out, success )
47#define TEST_EQUALITY_CONST( v1, v2 ) \
48 TEUCHOS_TEST_EQUALITY_CONST( v1, v2, out, success )
55#define TEST_EQUALITY( v1, v2 ) \
56 TEUCHOS_TEST_EQUALITY( v1, v2, out, success )
63#define TEST_INEQUALITY_CONST( v1, v2 ) \
64 TEUCHOS_TEST_INEQUALITY_CONST( v1, v2, out, success )
71#define TEST_INEQUALITY( v1, v2 ) \
72 TEUCHOS_TEST_INEQUALITY( v1, v2, out, success )
80#define TEST_FLOATING_EQUALITY( v1, v2, tol ) \
81 TEUCHOS_TEST_FLOATING_EQUALITY( v1, v2, tol, out, success )
88#define TEST_ITER_EQUALITY( iter1, iter2 ) \
89 TEUCHOS_TEST_ITER_EQUALITY( iter1, iter2, out, success )
96#define TEST_ITER_INEQUALITY( iter1, iter2 ) \
97 TEUCHOS_TEST_ITER_INEQUALITY( iter1, iter2, out, success )
104#define TEST_ARRAY_ELE_EQUALITY( a, i, val ) \
105 TEUCHOS_TEST_ARRAY_ELE_EQUALITY( a, i, val, false, out, local_success )
112#define TEST_ARRAY_ELE_INEQUALITY( a, i, val ) \
113 TEUCHOS_TEST_ARRAY_ELE_INEQUALITY( a, i, val, false, out, local_success )
120#define TEST_COMPARE( v1, comp, v2 ) \
121 TEUCHOS_TEST_COMPARE( v1, comp, v2, out, success )
129#define TEST_COMPARE_CONST( v1, comp, v2 ) \
130 TEUCHOS_TEST_COMPARE_CONST( v1, comp, v2, out, success )
140#define TEST_COMPARE_ARRAYS( a1, a2 ) \
142 const bool l_result = compareArrays(a1,#a1,a2,#a2,out); \
143 if (!l_result) success = false; \
154#define TEST_COMPARE_FLOATING_ARRAYS( a1, a2, tol ) \
156 const bool result = compareFloatingArrays(a1,#a1,a2,#a2,tol,out); \
157 if (!result) success = false; \
168#define TEST_ABSOLUTE_COMPARE_FLOATING_ARRAYS( a1, a2, tol ) \
170 const bool result = compareFloatingArraysAbsolute(a1,#a1,a2,#a2,tol,out); \
171 if (!result) success = false; \
179#define TEST_THROW( code, ExceptType ) \
180 TEUCHOS_TEST_THROW( code, ExceptType, out, success )
187#define TEST_NOTHROW( code ) \
188 TEUCHOS_TEST_NOTHROW( code, out, success )
Utilities to make writing tests easier.