testsuite.hh
Go to the documentation of this file.
00001 #ifndef TEST_SUITE_HH
00002 #define TEST_SUITE_HH
00003 
00004 #include <boost/version.hpp>
00005 #include <boost/test/test_tools.hpp>
00006 #include <boost/test/unit_test.hpp>
00007 #include <boost/test/unit_test_log.hpp>
00008 #include <boost/filesystem/path.hpp>
00009 
00010 using namespace boost::unit_test;
00011 
00012 #ifndef BOOST_REQUIRE_THROW
00013 #  define BOOST_REQUIRE_THROW(s,c) BOOST_CHECK_THROW(s,c)
00014 #  define BOOST_REQUIRE_NO_THROW(s) BOOST_CHECK_NO_THROW(s)
00015 #  define BOOST_REQUIRE_EQUAL(s,c) BOOST_CHECK_EQUAL(s,c)
00016 #endif
00017 
00018 #if BOOST_VERSION < 103300
00019 inline void set_log_threshold_level(log_level lev)
00020 { unit_test_log::instance().set_log_threshold_level(lev); }
00021 #else
00022 inline void set_log_threshold_level(log_level lev)
00023 { unit_test_log.set_threshold_level(lev); }
00024 #endif
00025 
00026 #endif
00027 
00028 #if BOOST_VERSION >= 104600
00029 inline std::string path_to_string(boost::filesystem::path p)
00030 { return p.string(); }
00031 #else
00032 inline std::string path_to_string(boost::filesystem::path p)
00033 { return p.native_file_string(); }
00034 #endif
00035 


utilmm
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Wed Sep 16 2015 07:05:43