Update enable_if tests to use lightweight_test, add to Jamfile.

This commit is contained in:
Peter Dimov
2014-06-01 02:10:28 +03:00
parent ba9f0e47a1
commit 927f98189d
9 changed files with 74 additions and 70 deletions

View File

@@ -10,10 +10,9 @@
// Jeremiah Willcock (jewillco at osl.iu.edu)
// Andrew Lumsdaine (lums at osl.iu.edu)
#include <boost/test/minimal.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_arithmetic.hpp>
#include <boost/detail/lightweight_test.hpp>
using boost::enable_if_c;
using boost::disable_if_c;
@@ -47,21 +46,21 @@ struct tester2<T, typename disable_if<is_arithmetic<T> >::type> {
BOOST_STATIC_CONSTANT(bool, value = false);
};
int test_main(int, char*[])
int main()
{
BOOST_CHECK(tester<int>::value);
BOOST_CHECK(tester<double>::value);
BOOST_TEST(tester<int>::value);
BOOST_TEST(tester<double>::value);
BOOST_CHECK(!tester<char*>::value);
BOOST_CHECK(!tester<void*>::value);
BOOST_TEST(!tester<char*>::value);
BOOST_TEST(!tester<void*>::value);
BOOST_CHECK(tester2<int>::value);
BOOST_CHECK(tester2<double>::value);
BOOST_TEST(tester2<int>::value);
BOOST_TEST(tester2<double>::value);
BOOST_CHECK(!tester2<char*>::value);
BOOST_CHECK(!tester2<void*>::value);
BOOST_TEST(!tester2<char*>::value);
BOOST_TEST(!tester2<void*>::value);
return 0;
return boost::report_errors();
}