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