|
Teuchos - Trilinos Tools Package Version of the Day
|
00001 // @HEADER 00002 // *********************************************************************** 00003 // 00004 // Teuchos: Common Tools Package 00005 // Copyright (2004) Sandia Corporation 00006 // 00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00008 // license for use of this work by or on behalf of the U.S. Government. 00009 // 00010 // This library is free software; you can redistribute it and/or modify 00011 // it under the terms of the GNU Lesser General Public License as 00012 // published by the Free Software Foundation; either version 2.1 of the 00013 // License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, but 00016 // WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser General Public 00021 // License along with this library; if not, write to the Free Software 00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00023 // USA 00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 00025 // 00026 // *********************************************************************** 00027 // @HEADER 00028 00029 #ifndef TEUCHOS_LOCAL_TESTING_HELPERS_HPP 00030 #define TEUCHOS_LOCAL_TESTING_HELPERS_HPP 00031 00032 00043 #include "Teuchos_TestingHelpers.hpp" 00044 00045 00047 #define ECHO( statement ) \ 00048 TEUCHOS_ECHO( statement, out ) 00049 00050 00052 #define TEST_ASSERT( v1 ) \ 00053 TEUCHOS_TEST_ASSERT( v1, out, success ) 00054 00055 00057 #define TEST_EQUALITY_CONST( v1, v2 ) \ 00058 TEUCHOS_TEST_EQUALITY_CONST( v1, v2, out, success ) 00059 00060 00062 #define TEST_EQUALITY( v1, v2 ) \ 00063 TEUCHOS_TEST_EQUALITY( v1, v2, out, success ) 00064 00065 00067 #define TEST_INEQUALITY_CONST( v1, v2 ) \ 00068 TEUCHOS_TEST_INEQUALITY_CONST( v1, v2, out, success ) 00069 00070 00072 #define TEST_INEQUALITY( v1, v2 ) \ 00073 TEUCHOS_TEST_INEQUALITY( v1, v2, out, success ) 00074 00075 00077 #define TEST_FLOATING_EQUALITY( v1, v2, tol ) \ 00078 TEUCHOS_TEST_FLOATING_EQUALITY( v1, v2, tol, out, success ) 00079 00080 00082 #define TEST_ITER_EQUALITY( iter1, iter2 ) \ 00083 TEUCHOS_TEST_ITER_EQUALITY( iter1, iter2, out, success ) 00084 00085 00087 #define TEST_ARRAY_ELE_EQUALITY( a, i, val ) \ 00088 TEUCHOS_TEST_ARRAY_ELE_EQUALITY( a, i, val, false, out, local_success ) 00089 00090 00092 #define TEST_ARRAY_ELE_INEQUALITY( a, i, val ) \ 00093 TEUCHOS_TEST_ARRAY_ELE_INEQUALITY( a, i, val, false, out, local_success ) 00094 00095 00097 #define TEST_COMPARE( v1, comp, v2 ) \ 00098 TEUCHOS_TEST_COMPARE( v1, comp, v2, out, success ) 00099 00100 00102 #define TEST_COMPARE_ARRAYS( a1, a2 ) \ 00103 { \ 00104 const bool l_result = compareArrays(a1,#a1,a2,#a2,out); \ 00105 if (!l_result) success = false; \ 00106 } 00107 00108 00110 #define TEST_COMPARE_FLOATING_ARRAYS( a1, a2, tol ) \ 00111 { \ 00112 const bool result = compareFloatingArrays(a1,#a1,a2,#a2,tol,out); \ 00113 if (!result) success = false; \ 00114 } 00115 00116 00118 #define TEST_THROW( code, ExceptType ) \ 00119 TEUCHOS_TEST_THROW( code, ExceptType, out, success ) 00120 00121 00123 #define TEST_NOTHROW( code ) \ 00124 TEUCHOS_TEST_NOTHROW( code, out, success ) 00125 00126 00127 #endif // TEUCHOS_LOCAL_TESTING_HELPERS_HPP
1.7.4