mirror of
https://github.com/boostorg/core.git
synced 2025-11-28 21:30:09 +01:00
Update enable_if tests to use lightweight_test, add to Jamfile.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user