00001 #ifndef QPIPD_TEST_UNIT_TEST_H_
00002 #define QPIPD_TEST_UNIT_TEST_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include <boost/version.hpp>
00029 #include <limits.h>
00030
00031
00032
00033 #if (BOOST_VERSION < 103400)
00034 # include <boost/test/auto_unit_test.hpp>
00035 #else
00036 # include <boost/test/unit_test.hpp>
00037 #endif // BOOST_VERSION
00038
00039
00040
00041 #if (BOOST_VERSION < 103300)
00042
00043 # define QPID_AUTO_TEST_SUITE(name)
00044 # define QPID_AUTO_TEST_CASE(name) BOOST_AUTO_UNIT_TEST(name)
00045 # define QPID_AUTO_TEST_SUITE_END()
00046
00047 #elif (BOOST_VERSION < 103400)
00048
00049 # define QPID_AUTO_TEST_SUITE(name) BOOST_AUTO_TEST_SUITE(name);
00050 # define QPID_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END();
00051
00052 #endif // Workarounds for BOOST_AUTO_TEST_CASE|SUITE|SUITE_END
00053
00054
00055
00056 #if (BOOST_VERSION < 103500)
00057
00058
00059
00060 # define QPID_AUTO_TEST_CASE_EXPECTED_FAILURES(test_name,n) \
00061 namespace { struct test_name { void test_method(); }; } \
00062 void test_name::test_method()
00063
00064 #endif // Workaround for BOOST_AUTO_TEST_SUITE_EXPECTED_FAILURES
00065
00066
00067
00068
00069
00070 #ifndef QPID_AUTO_TEST_SUITE
00071 # define QPID_AUTO_TEST_SUITE(name) BOOST_AUTO_TEST_SUITE(name)
00072 #endif
00073
00074 #ifndef QPID_AUTO_TEST_CASE
00075 # define QPID_AUTO_TEST_CASE(name) BOOST_AUTO_TEST_CASE(name)
00076 #endif
00077
00078 #ifndef QPID_AUTO_TEST_CASE_EXPECTED_FAILURES
00079 # define QPID_AUTO_TEST_CASE_EXPECTED_FAILURES(name,n) BOOST_AUTO_TEST_SUITE_EXPECTED_FAILURES(name,n)
00080 #endif
00081
00082 #ifndef QPID_AUTO_TEST_SUITE_END
00083 # define QPID_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END()
00084 #endif
00085
00086 #endif // !QPIPD_TEST_UNIT_TEST_H_