libMesh
libmesh_cppunit.h
Go to the documentation of this file.
1 // Ignore unused parameter warnings coming from cppunit headers
2 #include <libmesh/ignore_warnings.h>
3 #include <cppunit/extensions/HelperMacros.h>
4 #include <cppunit/TestCase.h>
5 #include <libmesh/restore_warnings.h>
6 
7 #if defined(LIBMESH_DEFAULT_QUADRUPLE_PRECISION) || \
8  defined(LIBMESH_DEFAULT_TRIPLE_PRECISION)
9 # define LIBMESH_ASSERT_FP_EQUAL(first,second,delta) \
10  CPPUNIT_ASSERT_DOUBLES_EQUAL(double(first-second),0,double(delta))
11 #else
12 # define LIBMESH_ASSERT_FP_EQUAL(first,second,delta) \
13  CPPUNIT_ASSERT_DOUBLES_EQUAL(first,second,delta)
14 #endif
15 
16 // THE CPPUNIT_TEST_SUITE_END macro expands to code that involves
17 // std::auto_ptr, which in turn produces -Wdeprecated-declarations
18 // warnings. These can be ignored in GCC as long as we wrap the
19 // offending code in appropriate pragmas. We can't get away with a
20 // single ignore_warnings.h inclusion at the beginning of this file,
21 // since the libmesh headers pull in a restore_warnings.h at some
22 // point. This should thus be the *last* header included in our test
23 // suite files.
24 #include <libmesh/ignore_warnings.h>
25 #ifdef __clang__
26 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
27 #endif
28 #if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__)
29 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ > 5)
30 #pragma GCC diagnostic push
31 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
32 #endif // GCC > 4.5
33 #endif // __GNUC__ && !__INTEL_COMPILER