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

@@ -12,11 +12,9 @@
// Testing all variations of lazy_enable_if.
#include <boost/test/minimal.hpp>
#include <boost/mpl/not.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/detail/lightweight_test.hpp>
using boost::lazy_enable_if;
using boost::lazy_disable_if;
@@ -79,22 +77,22 @@ namespace B {
foo2(T t) { return false; }
}
int test_main(int, char*[])
int main()
{
using namespace A;
using namespace B;
BOOST_CHECK(foo(1));
BOOST_CHECK(foo(1.0));
BOOST_TEST(foo(1));
BOOST_TEST(foo(1.0));
BOOST_CHECK(!foo("1"));
BOOST_CHECK(!foo(static_cast<void*>(0)));
BOOST_TEST(!foo("1"));
BOOST_TEST(!foo(static_cast<void*>(0)));
BOOST_CHECK(foo2(1));
BOOST_CHECK(foo2(1.0));
BOOST_TEST(foo2(1));
BOOST_TEST(foo2(1.0));
BOOST_CHECK(!foo2("1"));
BOOST_CHECK(!foo2(static_cast<void*>(0)));
BOOST_TEST(!foo2("1"));
BOOST_TEST(!foo2(static_cast<void*>(0)));
return 0;
return boost::report_errors();
}