MLPACK  1.0.7
old_boost_test_definitions.hpp
Go to the documentation of this file.
1 
23 #ifndef __MLPACK_TESTS_OLD_BOOST_TEST_DEFINITIONS_HPP
24 #define __MLPACK_TESTS_OLD_BOOST_TEST_DEFINITIONS_HPP
25 
26 #include <boost/version.hpp>
27 
28 // This is only necessary for pre-1.36 Boost.Test.
29 #if BOOST_VERSION < 103600
30 
31 #include <boost/test/floating_point_comparison.hpp>
32 #include <boost/test/auto_unit_test.hpp>
33 
34 // This depends on other macros. Probably not a great idea... but it works, and
35 // we only need it for ancient Boost versions.
36 #define BOOST_REQUIRE_GE( L, R ) \
37  BOOST_REQUIRE_EQUAL( (L >= R), true )
38 
39 #define BOOST_REQUIRE_NE( L, R ) \
40  BOOST_REQUIRE_EQUAL( (L != R), true )
41 
42 #define BOOST_REQUIRE_LE( L, R ) \
43  BOOST_REQUIRE_EQUAL( (L <= R), true )
44 
45 #define BOOST_REQUIRE_LT( L, R ) \
46  BOOST_REQUIRE_EQUAL( (L < R), true )
47 
48 #define BOOST_REQUIRE_GT( L, R ) \
49  BOOST_REQUIRE_EQUAL( (L > R), true )
50 
51 #endif
52 
53 #endif