Teuchos - Trilinos Tools Package Version of the Day
Defines
Teuchos_LocalTestingHelpers.hpp File Reference

Utilities to make writing tests easier. More...

#include "Teuchos_TestingHelpers.hpp"

Go to the source code of this file.

Defines

#define ECHO(statement)   TEUCHOS_ECHO( statement, out )
 Echo the given statement before it is executed.
#define TEST_ASSERT(v1)   TEUCHOS_TEST_ASSERT( v1, out, success )
 Assert the given statement is true.
#define TEST_EQUALITY_CONST(v1, v2)   TEUCHOS_TEST_EQUALITY_CONST( v1, v2, out, success )
 Assert the equality of v1 and constant v2.
#define TEST_EQUALITY(v1, v2)   TEUCHOS_TEST_EQUALITY( v1, v2, out, success )
 Assert the equality of v1 and v2.
#define TEST_INEQUALITY_CONST(v1, v2)   TEUCHOS_TEST_INEQUALITY_CONST( v1, v2, out, success )
 Assert the inequality of v1 and constant v2.
#define TEST_INEQUALITY(v1, v2)   TEUCHOS_TEST_INEQUALITY( v1, v2, out, success )
 Assert the inequality of v1 and v2.
#define TEST_FLOATING_EQUALITY(v1, v2, tol)   TEUCHOS_TEST_FLOATING_EQUALITY( v1, v2, tol, out, success )
 Assert the relative floating-point equality of rel_error(v1,v2) <= tol.
#define TEST_ITER_EQUALITY(iter1, iter2)   TEUCHOS_TEST_ITER_EQUALITY( iter1, iter2, out, success )
 Assert that two iterators are equal.
#define TEST_ARRAY_ELE_EQUALITY(a, i, val)   TEUCHOS_TEST_ARRAY_ELE_EQUALITY( a, i, val, false, out, local_success )
 Assert that a[i] == val.
#define TEST_ARRAY_ELE_INEQUALITY(a, i, val)   TEUCHOS_TEST_ARRAY_ELE_INEQUALITY( a, i, val, false, out, local_success )
 Assert that a[i] != val.
#define TEST_COMPARE(v1, comp, v2)   TEUCHOS_TEST_COMPARE( v1, comp, v2, out, success )
 Assert that v1 comp v2 (where comp = '==', '>=", "!=", etc).
#define TEST_COMPARE_ARRAYS(a1, a2)
 Assert that a1.size()==a2.size() and a[i]==b[i], i=0....
#define TEST_COMPARE_FLOATING_ARRAYS(a1, a2, tol)
 Assert that a1.size()==a2.size() and rel_error(a[i],b[i]) <= tol, i=0....
#define TEST_THROW(code, ExceptType)   TEUCHOS_TEST_THROW( code, ExceptType, out, success )
 Assert that the statement 'code' throws the exception 'ExceptType' (otherwise the test fails).
#define TEST_NOTHROW(code)   TEUCHOS_TEST_NOTHROW( code, out, success )
 Asserr that the statement 'code' does *not* thrown any excpetions.

Detailed Description

Utilities to make writing tests easier.

WARNING! These macros are not namespaced, so you must only include it in *.cpp files for unit testing only!

Definition in file Teuchos_LocalTestingHelpers.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines