forked from boostorg/core
Switch swap tests to lightweight_test.
This commit is contained in:
1 parent
1a956992bd
commit
5d251ae769
20 files changed
+97
-77
No files matched your search
@@ -5,8 +5,9 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/utility/swap.hpp>
|
||||
#define BOOST_INCLUDE_MAIN
|
||||
#include <boost/test/test_tools.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#define BOOST_CHECK BOOST_TEST
|
||||
#define BOOST_CHECK_EQUAL BOOST_TEST_EQ
|
||||
|
||||
//Put test class in the global namespace
|
||||
#include "./swap_test_class.hpp"
|
||||
@@ -17,7 +18,7 @@ void swap(swap_test_class& left, swap_test_class& right)
|
||||
left.swap(right);
|
||||
}
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
const swap_test_class initial_value1(1);
|
||||
const swap_test_class initial_value2(2);
|
||||
@@ -34,6 +35,6 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(swap_test_class::swap_count(),1);
|
||||
BOOST_CHECK_EQUAL(swap_test_class::copy_count(),0);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user