forked from boostorg/core
Compare commits
10 Commits
boost-1.56
...
boost-1.57
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c79a7ca62 | ||
|
|
f47430a1c2 | ||
|
|
d2535c1da9 | ||
|
|
76443159e3 | ||
|
|
3378fd7b47 | ||
|
|
e4e1a1fda5 | ||
|
|
8be6df26ac | ||
|
|
5d251ae769 | ||
|
|
4b43a0f9c8 | ||
|
|
1a956992bd |
@@ -49,7 +49,7 @@ template<class T> struct addressof_impl
|
||||
|
||||
#if !defined( BOOST_NO_CXX11_NULLPTR )
|
||||
|
||||
#if defined( __clang__ ) && !defined( _LIBCPP_VERSION ) && !defined( BOOST_NO_CXX11_DECLTYPE )
|
||||
#if !defined( BOOST_NO_CXX11_DECLTYPE ) && ( ( defined( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) )
|
||||
|
||||
typedef decltype(nullptr) addr_nullptr_t;
|
||||
|
||||
|
||||
@@ -65,8 +65,8 @@ struct underlying_type_impl
|
||||
*
|
||||
* Requires EnumType must be an enum type or the emulation of a scoped enum.
|
||||
* If BOOST_NO_UNDERLYING_TYPE is defined, the implementation will not be able
|
||||
* to deduce the underlying type of enums. The used is expected to specialize
|
||||
* this trait.
|
||||
* to deduce the underlying type of enums. The user is expected to specialize
|
||||
* this trait in this case.
|
||||
*/
|
||||
template< typename EnumType >
|
||||
struct underlying_type :
|
||||
|
||||
@@ -17,6 +17,24 @@
|
||||
"Miscellaneous"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "utility/enable_if",
|
||||
"name": "Enable If",
|
||||
"authors": [
|
||||
"Jaakko J\u00e4rvi",
|
||||
"Jeremiah Willcock",
|
||||
"Andrew Lumsdaine"
|
||||
],
|
||||
"description": "Selective inclusion of function template overloads.",
|
||||
"documentation": "doc/html/core/enable_if.html",
|
||||
"category": [
|
||||
"Generic"
|
||||
],
|
||||
"maintainers": [
|
||||
"Jaakko Jarvi <jarvi -at- cs.tamu.edu>",
|
||||
"Jeremiah Willcock <jewillco -at- osl.iu.edu>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "utility/swap",
|
||||
"boost-version": "1.38.0",
|
||||
@@ -32,5 +50,23 @@
|
||||
"maintainers": [
|
||||
"Joseph Gauterin <joseph.gauterin -at- googlemail.com>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "bind/ref",
|
||||
"name": "Ref",
|
||||
"authors": [
|
||||
"Jaako Järvi",
|
||||
"Peter Dimov",
|
||||
"Doug Gregor",
|
||||
"Dave Abrahams"
|
||||
],
|
||||
"description": "A utility library for passing references to generic functions.",
|
||||
"documentation": "ref.html",
|
||||
"std": [
|
||||
"tr1"
|
||||
],
|
||||
"category": [
|
||||
"Function-objects"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
29
ref.html
Normal file
29
ref.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Core</title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0; url=doc/html/core/ref.html">
|
||||
<style>
|
||||
body {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
}
|
||||
a {
|
||||
color: #00f;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Automatic redirection failed, please go to
|
||||
<a href="doc/html/core/ref.html">doc/html/core/ref.html</a>
|
||||
</p>
|
||||
<p>
|
||||
© 2014 Peter Dimov<br>
|
||||
© 2014 Glen Fernandes<br>
|
||||
© 2014 Andrey Semashev
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -52,7 +52,7 @@ rule test_all
|
||||
for file in $(run_tests)
|
||||
{
|
||||
local test_name = [ MATCH "([^.]*).cpp$" : $(file) ] ;
|
||||
all_rules += [ run $(file) ../../../test/build//boost_test_exec_monitor/<link>static : : : : "swap-$(test_name)" ] ;
|
||||
all_rules += [ run $(file) : : : : "swap-$(test_name)" ] ;
|
||||
}
|
||||
|
||||
#ECHO All rules: $(all_rules) ;
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
// Tests swapping an array of arrays of swap_test_class objects by means of boost::swap.
|
||||
|
||||
#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"
|
||||
@@ -36,7 +37,7 @@ namespace std
|
||||
}
|
||||
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
const std::size_t first_dimension = 3;
|
||||
const std::size_t second_dimension = 4;
|
||||
@@ -65,5 +66,5 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(swap_test_class::swap_count(), number_of_elements);
|
||||
BOOST_CHECK_EQUAL(swap_test_class::copy_count(), 0);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
// Tests swapping an array of arrays of integers by means of boost::swap.
|
||||
|
||||
#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
|
||||
|
||||
#include <algorithm> //for std::copy and std::equal
|
||||
#include <cstddef> //for std::size_t
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
const std::size_t first_dimension = 3;
|
||||
const std::size_t second_dimension = 4;
|
||||
@@ -38,5 +39,6 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(ptr1[i], static_cast<int>(i + number_of_elements) );
|
||||
BOOST_CHECK_EQUAL(ptr2[i], static_cast<int>(i) );
|
||||
}
|
||||
return 0;
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
// Tests swapping an array of arrays of swap_test_class objects by means of boost::swap.
|
||||
|
||||
#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"
|
||||
@@ -36,7 +37,7 @@ namespace std
|
||||
}
|
||||
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
const std::size_t array_size = 2;
|
||||
const swap_test_class initial_array1[array_size] = { swap_test_class(1), swap_test_class(2) };
|
||||
@@ -57,5 +58,5 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(swap_test_class::swap_count(), array_size);
|
||||
BOOST_CHECK_EQUAL(swap_test_class::copy_count(), 0);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
@@ -7,14 +7,15 @@
|
||||
// Tests swapping an array of integers by means of boost::swap.
|
||||
|
||||
#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
|
||||
|
||||
#include <algorithm> //for std::copy and std::equal
|
||||
#include <cstddef> //for std::size_t
|
||||
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
const std::size_t array_size = 3;
|
||||
const int initial_array1[array_size] = { 1, 2, 3 };
|
||||
@@ -31,5 +32,5 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK(std::equal(array1, array1 + array_size, initial_array2));
|
||||
BOOST_CHECK(std::equal(array2, array2 + array_size, initial_array1));
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
// Tests swapping an array of swap_test_template<int> objects by means of boost::swap.
|
||||
|
||||
#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"
|
||||
@@ -46,7 +47,7 @@ void swap(swap_test_template<T>& left, swap_test_template<T>& right)
|
||||
}
|
||||
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
const std::size_t array_size = 2;
|
||||
const swap_test_template<int> initial_array1[array_size] = { swap_test_class(1), swap_test_class(2) };
|
||||
@@ -67,5 +68,5 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(swap_test_class::swap_count(), array_size);
|
||||
BOOST_CHECK_EQUAL(swap_test_class::copy_count(), 0);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
// than std::swap.
|
||||
|
||||
#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 namespace boost
|
||||
namespace boost
|
||||
@@ -23,7 +24,7 @@ namespace boost
|
||||
}
|
||||
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
const boost::swap_test_class initial_value1(1);
|
||||
const boost::swap_test_class initial_value2(2);
|
||||
@@ -39,6 +40,6 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(boost::swap_test_class::swap_count(),0);
|
||||
BOOST_CHECK_EQUAL(boost::swap_test_class::copy_count(),3);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
// 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
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
int object1 = 1;
|
||||
int object2 = 2;
|
||||
@@ -18,6 +19,6 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(object1,2);
|
||||
BOOST_CHECK_EQUAL(object2,1);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
@@ -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 namespace boost
|
||||
namespace boost
|
||||
@@ -23,7 +24,7 @@ namespace boost
|
||||
}
|
||||
}
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
const boost::swap_test_class initial_value1(1);
|
||||
const boost::swap_test_class initial_value2(2);
|
||||
@@ -40,6 +41,6 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(boost::swap_test_class::swap_count(),1);
|
||||
BOOST_CHECK_EQUAL(boost::swap_test_class::copy_count(),0);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
// to the boost namespace.
|
||||
|
||||
#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 namespace other
|
||||
namespace other
|
||||
@@ -42,7 +43,7 @@ namespace other
|
||||
}
|
||||
}
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
const other::swap_test_class initial_value1(1);
|
||||
const other::swap_test_class initial_value2(2);
|
||||
@@ -59,6 +60,6 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(other::swap_test_class::swap_count(),1);
|
||||
BOOST_CHECK_EQUAL(other::swap_test_class::copy_count(),0);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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 namespace other
|
||||
namespace other
|
||||
@@ -23,7 +24,7 @@ namespace other
|
||||
}
|
||||
}
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
const other::swap_test_class initial_value1(1);
|
||||
const other::swap_test_class initial_value2(2);
|
||||
@@ -40,6 +41,6 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(other::swap_test_class::swap_count(),1);
|
||||
BOOST_CHECK_EQUAL(other::swap_test_class::copy_count(),0);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
@@ -22,7 +23,7 @@ namespace std
|
||||
}
|
||||
}
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
const swap_test_class initial_value1(1);
|
||||
const swap_test_class initial_value2(2);
|
||||
@@ -39,6 +40,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();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,13 @@
|
||||
// std::bitset<T> does not have its own std::swap overload.
|
||||
|
||||
#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
|
||||
|
||||
#include <bitset>
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
typedef std::bitset<8> bitset_type;
|
||||
const bitset_type initial_value1 = 1;
|
||||
@@ -28,6 +29,6 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(object1,initial_value2);
|
||||
BOOST_CHECK_EQUAL(object2,initial_value1);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,13 @@
|
||||
// std::swap overload or template specialization.
|
||||
|
||||
#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
|
||||
|
||||
#include <locale>
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
const std::time_base::dateorder initial_value1 = std::time_base::dmy;
|
||||
const std::time_base::dateorder initial_value2 = std::time_base::mdy;
|
||||
@@ -27,6 +28,6 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(object1,initial_value2);
|
||||
BOOST_CHECK_EQUAL(object2,initial_value1);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,12 +8,13 @@
|
||||
// std::string has its own std::swap overload.
|
||||
|
||||
#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
|
||||
|
||||
#include <string>
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
const std::string initial_value1 = "one";
|
||||
const std::string initial_value2 = "two";
|
||||
@@ -26,6 +27,6 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(object1,initial_value2);
|
||||
BOOST_CHECK_EQUAL(object2,initial_value1);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,13 @@
|
||||
// for std::type_info pointers.
|
||||
|
||||
#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
|
||||
|
||||
#include <typeinfo>
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
const std::type_info * const initial_value1 = 0;
|
||||
const std::type_info * const initial_value2 = &typeid(double);
|
||||
@@ -27,6 +28,6 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(ptr1,initial_value2);
|
||||
BOOST_CHECK_EQUAL(ptr2,initial_value1);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
// having boost::swap_test_class as vector element type.
|
||||
|
||||
#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
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -28,7 +29,7 @@ namespace boost
|
||||
}
|
||||
}
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
typedef boost::swap_test_class swap_test_class_type;
|
||||
typedef std::vector<swap_test_class_type> vector_type;
|
||||
@@ -55,6 +56,6 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(swap_test_class_type::swap_count(),0);
|
||||
BOOST_CHECK_EQUAL(swap_test_class_type::copy_count(),0);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
// having ::swap_test_class as vector element type.
|
||||
|
||||
#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
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -22,7 +23,7 @@ void swap(swap_test_class& left, swap_test_class& right)
|
||||
left.swap(right);
|
||||
}
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
typedef std::vector<swap_test_class> vector_type;
|
||||
|
||||
@@ -48,6 +49,6 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(swap_test_class::swap_count(),0);
|
||||
BOOST_CHECK_EQUAL(swap_test_class::copy_count(),0);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
// having other::swap_test_class as vector element type.
|
||||
|
||||
#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
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -28,7 +29,7 @@ namespace other
|
||||
}
|
||||
}
|
||||
|
||||
int test_main(int, char*[])
|
||||
int main()
|
||||
{
|
||||
typedef other::swap_test_class swap_test_class_type;
|
||||
typedef std::vector<swap_test_class_type> vector_type;
|
||||
@@ -55,6 +56,6 @@ int test_main(int, char*[])
|
||||
BOOST_CHECK_EQUAL(swap_test_class_type::swap_count(),0);
|
||||
BOOST_CHECK_EQUAL(swap_test_class_type::copy_count(),0);
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user