|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r68965 - sandbox/conversion/libs/conversion_ext/test
From: vicente.botet_at_[hidden]
Date: 2011-02-16 19:01:13
Author: viboes
Date: 2011-02-16 19:01:07 EST (Wed, 16 Feb 2011)
New Revision: 68965
URL: http://svn.boost.org/trac/boost/changeset/68965
Log:
Conversion: Move to lightweight_test avoiding kinking with Boost.Test which is not working on cygwin and mingw
Text files modified:
sandbox/conversion/libs/conversion_ext/test/Jamfile.v2 | 18 +++++++++++++-----
sandbox/conversion/libs/conversion_ext/test/array.cpp | 14 ++++++--------
sandbox/conversion/libs/conversion_ext/test/builtins.cpp | 24 ++++++++++--------------
sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_duration.cpp | 17 ++++++++---------
sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_time.cpp | 16 +++++++---------
sandbox/conversion/libs/conversion_ext/test/complex.cpp | 16 +++++++---------
sandbox/conversion/libs/conversion_ext/test/extrinsec.cpp | 16 +++++++---------
sandbox/conversion/libs/conversion_ext/test/interval.cpp | 16 +++++++---------
sandbox/conversion/libs/conversion_ext/test/intrinsec.cpp | 30 ++++++++++++++----------------
sandbox/conversion/libs/conversion_ext/test/optional.cpp | 12 +++++-------
sandbox/conversion/libs/conversion_ext/test/pair.cpp | 12 +++++-------
sandbox/conversion/libs/conversion_ext/test/rational.cpp | 12 +++++-------
sandbox/conversion/libs/conversion_ext/test/tuple.cpp | 12 +++++-------
sandbox/conversion/libs/conversion_ext/test/vector.cpp | 36 +++++++++++++++++-------------------
14 files changed, 116 insertions(+), 135 deletions(-)
Modified: sandbox/conversion/libs/conversion_ext/test/Jamfile.v2
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/Jamfile.v2 (original)
+++ sandbox/conversion/libs/conversion_ext/test/Jamfile.v2 2011-02-16 19:01:07 EST (Wed, 16 Feb 2011)
@@ -19,15 +19,23 @@
: requirements
<library>/boost/system//boost_system
<library>/boost/chrono//boost_chrono
- #<library>/boost/thread//boost_thread/<link>static
- <library>/boost/test//boost_unit_test_framework/<link>static
-
+
<toolset>msvc:<asynch-exceptions>on
<define>BOOST_ENABLE_WARNINGS
<warnings>all
<toolset>gcc:<cxxflags>-Wextra
- <toolset>gcc:<cxxflags>-Wno-long-long
- <toolset>gcc-mingw-4.5.0:<cxxflags>-Wno-missing-field-initializers
+ <toolset>gcc:<cxxflags>-pedantic
+ <toolset>gcc:<cxxflags>-Wno-long-long
+ <toolset>darwin:<cxxflags>-Wextra
+ <toolset>darwin:<cxxflags>-pedantic
+ <toolset>darwin:<cxxflags>-Wno-long-long
+ #<toolset>pathscale:<cxxflags>-Wextra
+ <toolset>pathscale:<cxxflags>-Wno-long-long
+ <toolset>pathscale:<cxxflags>-pedantic
+ <toolset>clang:<cxxflags>-Wextra
+ <toolset>clang:<cxxflags>-pedantic
+ <toolset>clang:<cxxflags>-Wno-long-long
+ <toolset>gcc-mingw-4.5.0:<cxxflags>-Wno-missing-field-initializers
<toolset>gcc-mingw-4.5.0:<cxxflags>-fdiagnostics-show-option
<toolset>msvc:<cxxflags>/wd4127
<toolset>msvc:<cxxflags>/wd4244
Modified: sandbox/conversion/libs/conversion_ext/test/array.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/array.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/array.cpp 2011-02-16 19:01:07 EST (Wed, 16 Feb 2011)
@@ -4,18 +4,17 @@
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-// See http://www.boost.org/libs/synchro for documentation.
+// See http://www.boost.org/libs/conversion for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/conversion/convert_to.hpp>
#include <boost/conversion/boost/array.hpp>
#include <iostream>
-#include <boost/test/unit_test.hpp>
+#include <boost/detail/lightweight_test.hpp>
#include "helper.hpp"
using namespace boost;
-using namespace boost::unit_test;
void explicit_convert_to() {
boost::array<B1,3> bs;
@@ -31,11 +30,10 @@
}
-test_suite* init_unit_test_suite(int, char*[])
+int main( )
{
- test_suite* test = BOOST_TEST_SUITE("array");
- test->add(BOOST_TEST_CASE(&explicit_convert_to));
- test->add(BOOST_TEST_CASE(&explicit_assign_to));
- return test;
+ explicit_convert_to();
+ explicit_assign_to();
+ return boost::report_errors();
}
Modified: sandbox/conversion/libs/conversion_ext/test/builtins.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/builtins.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/builtins.cpp 2011-02-16 19:01:07 EST (Wed, 16 Feb 2011)
@@ -1,22 +1,19 @@
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Vicente J. Botet Escriba 2008-2009. Distributed under the Boost
+// (C) Copyright Vicente J. Botet Escriba 2008-2011. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-// See http://www.boost.org/libs/synchro for documentation.
+// See http://www.boost.org/libs/conversion for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <iostream>
-#include <boost/test/unit_test.hpp>
+#include <boost/detail/lightweight_test.hpp>
#include <boost/conversion/ca_wrapper.hpp>
#include <boost/conversion/convert_to.hpp>
//using namespace boost;
-using namespace boost::unit_test;
-
-
void convert_to_with_builtin_types() {
char c=0;
@@ -183,14 +180,13 @@
}
}
-test_suite* init_unit_test_suite(int, char*[])
+int main( )
{
- test_suite* test = BOOST_TEST_SUITE("builtins");
- test->add(BOOST_TEST_CASE(&convert_to_with_builtin_types));
- test->add(BOOST_TEST_CASE(&assign_to_with_builtin_types));
- test->add(BOOST_TEST_CASE(&mca_assign_to_with_builtin_types));
- test->add(BOOST_TEST_CASE(&assign_to_transitive));
- test->add(BOOST_TEST_CASE(&mca_assign_to_transitive));
- return test;
+ convert_to_with_builtin_types();
+ assign_to_with_builtin_types();
+ mca_assign_to_with_builtin_types();
+ assign_to_transitive();
+ mca_assign_to_transitive();
+ return boost::report_errors();
}
Modified: sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_duration.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_duration.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_duration.cpp 2011-02-16 19:01:07 EST (Wed, 16 Feb 2011)
@@ -1,20 +1,19 @@
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Vicente J. Botet Escriba 2008-2009. Distributed under the Boost
+// (C) Copyright Vicente J. Botet Escriba 2008-2011. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-// See http://www.boost.org/libs/synchro for documentation.
+// See http://www.boost.org/libs/conversion for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/conversion/convert_to.hpp>
#include <boost/conversion/boost/chrono_posix_time.hpp>
#include <iostream>
-#include <boost/test/unit_test.hpp>
+#include <boost/detail/lightweight_test.hpp>
using namespace boost;
-using namespace boost::unit_test;
typedef int A1;
typedef short B1;
@@ -33,11 +32,11 @@
boost::assign_to(c, b);
}
-test_suite* init_unit_test_suite(int, char*[])
+int main( )
+
{
- test_suite* test = BOOST_TEST_SUITE("duration");
- test->add(BOOST_TEST_CASE(&explicit_convert_to));
- test->add(BOOST_TEST_CASE(&explicit_assign_to));
- return test;
+ explicit_convert_to();
+ explicit_assign_to();
+ return boost::report_errors();
}
Modified: sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_time.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_time.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_time.cpp 2011-02-16 19:01:07 EST (Wed, 16 Feb 2011)
@@ -1,20 +1,19 @@
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Vicente J. Botet Escriba 2008-2009. Distributed under the Boost
+// (C) Copyright Vicente J. Botet Escriba 2008-2011. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-// See http://www.boost.org/libs/synchro for documentation.
+// See http://www.boost.org/libs/conversion for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/conversion/convert_to.hpp>
#include <boost/conversion/boost/chrono_posix_time.hpp>
#include <iostream>
-#include <boost/test/unit_test.hpp>
+#include <boost/detail/lightweight_test.hpp>
using namespace boost;
-using namespace boost::unit_test;
typedef int A1;
typedef short B1;
@@ -33,11 +32,10 @@
boost::assign_to(c, b);
}
-test_suite* init_unit_test_suite(int, char*[])
+int main( )
{
- test_suite* test = BOOST_TEST_SUITE("time");
- test->add(BOOST_TEST_CASE(&explicit_convert_to));
- test->add(BOOST_TEST_CASE(&explicit_assign_to));
- return test;
+ explicit_convert_to();
+ explicit_assign_to();
+ return boost::report_errors();
}
Modified: sandbox/conversion/libs/conversion_ext/test/complex.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/complex.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/complex.cpp 2011-02-16 19:01:07 EST (Wed, 16 Feb 2011)
@@ -1,21 +1,20 @@
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Vicente J. Botet Escriba 2008-2009. Distributed under the Boost
+// (C) Copyright Vicente J. Botet Escriba 2008-2011. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-// See http://www.boost.org/libs/synchro for documentation.
+// See http://www.boost.org/libs/conversion for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <complex>
#include <boost/conversion/std/complex.hpp>
#include <iostream>
-#include <boost/test/unit_test.hpp>
+#include <boost/detail/lightweight_test.hpp>
#include "helper.hpp"
using namespace boost;
-using namespace boost::unit_test;
void explicit_convert_to() {
B1 b1;
@@ -34,11 +33,10 @@
boost::assign_to(a,std::complex<B1>(b1,b2));
}
-test_suite* init_unit_test_suite(int, char*[])
+int main( )
{
- test_suite* test = BOOST_TEST_SUITE("complex");
- test->add(BOOST_TEST_CASE(&explicit_convert_to));
- test->add(BOOST_TEST_CASE(&explicit_assign_to));
- return test;
+ explicit_convert_to();
+ explicit_assign_to();
+ return boost::report_errors();
}
Modified: sandbox/conversion/libs/conversion_ext/test/extrinsec.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/extrinsec.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/extrinsec.cpp 2011-02-16 19:01:07 EST (Wed, 16 Feb 2011)
@@ -1,20 +1,19 @@
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Vicente J. Botet Escriba 2008-2009. Distributed under the Boost
+// (C) Copyright Vicente J. Botet Escriba 2008-2011. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-// See http://www.boost.org/libs/synchro for documentation.
+// See http://www.boost.org/libs/conversion for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/conversion/convert_to.hpp>
#include <boost/conversion/ca_wrapper.hpp>
#include <iostream>
-#include <boost/test/unit_test.hpp>
+#include <boost/detail/lightweight_test.hpp>
using namespace boost;
-using namespace boost::unit_test;
struct A{};
struct B{};
@@ -40,11 +39,10 @@
boost::mca(a)= b;
}
-test_suite* init_unit_test_suite(int, char*[])
+int main( )
{
- test_suite* test = BOOST_TEST_SUITE("extrinsec");
- test->add(BOOST_TEST_CASE(&explicit_convert_to));
- test->add(BOOST_TEST_CASE(&explicit_assign_to));
- return test;
+ explicit_convert_to();
+ explicit_assign_to();
+ return boost::report_errors();
}
Modified: sandbox/conversion/libs/conversion_ext/test/interval.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/interval.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/interval.cpp 2011-02-16 19:01:07 EST (Wed, 16 Feb 2011)
@@ -1,20 +1,19 @@
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Vicente J. Botet Escriba 2008-2009. Distributed under the Boost
+// (C) Copyright Vicente J. Botet Escriba 2008-2011. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-// See http://www.boost.org/libs/synchro for documentation.
+// See http://www.boost.org/libs/conversion for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/conversion/convert_to.hpp>
#include <boost/conversion/boost/interval.hpp>
#include <iostream>
-#include <boost/test/unit_test.hpp>
+#include <boost/detail/lightweight_test.hpp>
using namespace boost;
-using namespace boost::unit_test;
typedef int A1;
typedef short B1;
@@ -37,11 +36,10 @@
boost::assign_to(a,boost::numeric::interval<B1>(b1,b2));
}
-test_suite* init_unit_test_suite(int, char*[])
+int main( )
{
- test_suite* test = BOOST_TEST_SUITE("interval");
- test->add(BOOST_TEST_CASE(&explicit_convert_to));
- test->add(BOOST_TEST_CASE(&explicit_assign_to));
- return test;
+ explicit_convert_to();
+ explicit_assign_to();
+ return boost::report_errors();
}
Modified: sandbox/conversion/libs/conversion_ext/test/intrinsec.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/intrinsec.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/intrinsec.cpp 2011-02-16 19:01:07 EST (Wed, 16 Feb 2011)
@@ -1,20 +1,19 @@
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Vicente J. Botet Escriba 2008-2009. Distributed under the Boost
+// (C) Copyright Vicente J. Botet Escriba 2008-2011. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-// See http://www.boost.org/libs/synchro for documentation.
+// See http://www.boost.org/libs/conversion for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/conversion/convert_to.hpp>
#include <boost/conversion/ca_wrapper.hpp>
#include <iostream>
-#include <boost/test/unit_test.hpp>
+#include <boost/detail/lightweight_test.hpp>
using namespace boost;
-using namespace boost::unit_test;
struct B{};
struct A {
@@ -127,20 +126,19 @@
}
-test_suite* init_unit_test_suite(int, char*[])
+int main( )
{
- test_suite* test = BOOST_TEST_SUITE("intrinsec");
- test->add(BOOST_TEST_CASE(&convert_to_with_implicit_constructor));
- test->add(BOOST_TEST_CASE(&convert_to_with_explicit_constructor));
- test->add(BOOST_TEST_CASE(&convert_to_with_conversion_operator));
- test->add(BOOST_TEST_CASE(&assign_to_with_assignemet_operator));
- test->add(BOOST_TEST_CASE(&assign_to_with_assignemet_operator_and_implicit_constructor));
- test->add(BOOST_TEST_CASE(&assign_to_with_assignemet_operator_and_conversion_operator));
- test->add(BOOST_TEST_CASE(&mca_with_assignemet_operator));
- test->add(BOOST_TEST_CASE(&mca_with_assignemet_operator_and_implicit_constructor));
- test->add(BOOST_TEST_CASE(&mca_with_assignemet_operator_and_conversion_operator));
+ convert_to_with_implicit_constructor();
+ convert_to_with_explicit_constructor();
+ convert_to_with_conversion_operator();
+ assign_to_with_assignemet_operator();
+ assign_to_with_assignemet_operator_and_implicit_constructor();
+ assign_to_with_assignemet_operator_and_conversion_operator();
+ mca_with_assignemet_operator();
+ mca_with_assignemet_operator_and_implicit_constructor();
+ mca_with_assignemet_operator_and_conversion_operator();
- return test;
+ return boost::report_errors();
}
Modified: sandbox/conversion/libs/conversion_ext/test/optional.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/optional.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/optional.cpp 2011-02-16 19:01:07 EST (Wed, 16 Feb 2011)
@@ -11,10 +11,9 @@
#include <boost/conversion/convert_to.hpp>
#include <boost/conversion/boost/optional.hpp>
#include <iostream>
-#include <boost/test/unit_test.hpp>
+#include <boost/detail/lightweight_test.hpp>
using namespace boost;
-using namespace boost::unit_test;
struct A1{};
struct B1{};
@@ -44,11 +43,10 @@
boost::assign_to(a, boost::optional<B1>(b1));
}
-test_suite* init_unit_test_suite(int, char*[])
+int main( )
{
- test_suite* test = BOOST_TEST_SUITE("optional");
- test->add(BOOST_TEST_CASE(&explicit_convert_to));
- test->add(BOOST_TEST_CASE(&explicit_assign_to));
- return test;
+ explicit_convert_to();
+ explicit_assign_to();
+ return boost::report_errors();
}
Modified: sandbox/conversion/libs/conversion_ext/test/pair.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/pair.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/pair.cpp 2011-02-16 19:01:07 EST (Wed, 16 Feb 2011)
@@ -12,11 +12,10 @@
#include <boost/conversion/assign_to.hpp>
#include <boost/conversion/std/pair.hpp>
#include <iostream>
-#include <boost/test/unit_test.hpp>
+#include <boost/detail/lightweight_test.hpp>
#include "helper.hpp"
using namespace boost;
-using namespace boost::unit_test;
void explicit_convert_to() {
B1 b1;
@@ -38,11 +37,10 @@
}
-test_suite* init_unit_test_suite(int, char*[])
+int main( )
{
- test_suite* test = BOOST_TEST_SUITE("pair");
- test->add(BOOST_TEST_CASE(&explicit_convert_to));
- test->add(BOOST_TEST_CASE(&explicit_assign_to));
- return test;
+ explicit_convert_to();
+ explicit_assign_to();
+ return boost::report_errors();
}
Modified: sandbox/conversion/libs/conversion_ext/test/rational.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/rational.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/rational.cpp 2011-02-16 19:01:07 EST (Wed, 16 Feb 2011)
@@ -11,10 +11,9 @@
#include <boost/conversion/convert_to.hpp>
#include <boost/conversion/boost/rational.hpp>
#include <iostream>
-#include <boost/test/unit_test.hpp>
+#include <boost/detail/lightweight_test.hpp>
using namespace boost;
-using namespace boost::unit_test;
typedef int A1;
typedef short B1;
@@ -36,11 +35,10 @@
boost::assign_to(a, boost::rational<B1>(b1,b2));
}
-test_suite* init_unit_test_suite(int, char*[])
+int main( )
{
- test_suite* test = BOOST_TEST_SUITE("rational");
- test->add(BOOST_TEST_CASE(&explicit_convert_to));
- test->add(BOOST_TEST_CASE(&explicit_assign_to));
- return test;
+ explicit_convert_to();
+ explicit_assign_to();
+ return boost::report_errors();
}
Modified: sandbox/conversion/libs/conversion_ext/test/tuple.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/tuple.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/tuple.cpp 2011-02-16 19:01:07 EST (Wed, 16 Feb 2011)
@@ -11,11 +11,10 @@
#include <boost/conversion/convert_to.hpp>
#include <boost/conversion/boost/tuple.hpp>
#include <iostream>
-#include <boost/test/unit_test.hpp>
+#include <boost/detail/lightweight_test.hpp>
#include "helper.hpp"
using namespace boost;
-using namespace boost::unit_test;
void explicit_convert_to() {
B1 b1;
@@ -37,11 +36,10 @@
}
-test_suite* init_unit_test_suite(int, char*[])
+int main( )
{
- test_suite* test = BOOST_TEST_SUITE("tuple");
- test->add(BOOST_TEST_CASE(&explicit_convert_to));
- test->add(BOOST_TEST_CASE(&explicit_assign_to));
- return test;
+ explicit_convert_to();
+ explicit_assign_to();
+ return boost::report_errors();
}
Modified: sandbox/conversion/libs/conversion_ext/test/vector.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/vector.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/vector.cpp 2011-02-16 19:01:07 EST (Wed, 16 Feb 2011)
@@ -1,32 +1,31 @@
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Vicente J. Botet Escriba 2008-2009. Distributed under the Boost
+// (C) Copyright Vicente J. Botet Escriba 2008-2011. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-// See http://www.boost.org/libs/synchro for documentation.
+// See http://www.boost.org/libs/conversion for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/conversion/convert_to.hpp>
#include <boost/conversion/std/vector.hpp>
#include <iostream>
-#include <boost/test/unit_test.hpp>
+#include <boost/detail/lightweight_test.hpp>
#include "helper.hpp"
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_same.hpp>
using namespace boost;
-using namespace boost::unit_test;
BOOST_STATIC_ASSERT((
boost::is_same<
- boost::conversion::result_of::pack2<std::vector<B1,std::allocator<B1> > const, std::allocator<A1> const>::type,
+ boost::conversion::result_of::pack2<std::vector<B1,std::allocator<B1> > const, std::allocator<A1> const>::type,
std::pair<
//~ boost::fusion::tuple<
- boost::reference_wrapper<std::vector<B1,std::allocator<B1> > const>,
- boost::reference_wrapper<std::allocator<A1> const>
+ boost::reference_wrapper<std::vector<B1,std::allocator<B1> > const>,
+ boost::reference_wrapper<std::allocator<A1> const>
>
>::value
));
@@ -52,12 +51,12 @@
std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
std::vector<A1> va2(boost::convert_to<std::vector<A1> >(vb2));
std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
-
+
std::allocator<A1> all;
std::vector<A1,std::allocator<A1> > va3(
boost::convert_to<std::vector<A1,std::allocator<A1> > >(
std::pair<
- boost::reference_wrapper<std::vector<B1> const>,
+ boost::reference_wrapper<std::vector<B1> const>,
boost::reference_wrapper<std::allocator<A1> const>
>(boost::cref(vb2), boost::cref(all))));
std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
@@ -66,18 +65,18 @@
boost::convert_to<std::vector<A1,std::allocator<A1> > >(
std::make_pair(boost::cref(vb2), boost::cref(all))));
std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
-
- boost::conversion::result_of::pack2<std::vector<B1> const, std::allocator<A1> const>::type v =
+
+ boost::conversion::result_of::pack2<std::vector<B1> const, std::allocator<A1> const>::type v =
boost::conversion::pack(vb2, all);
std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
-
+
//~ std::vector<A1,std::allocator<A1> > va4(
//~ boost::convert_to<std::vector<A1,std::allocator<A1> > >(v));
-
+
//~ std::vector<A1,std::allocator<A1> > va5(
//~ boost::convert_to<std::vector<A1,std::allocator<A1> > >(
//~ boost::conversion::pack(vb2, all)));
-
+
std::vector<A1,std::allocator<A1> > va6(
boost::convert_to<std::vector<A1,std::allocator<A1> > >(
boost::conversion::pack(vb2, std::allocator<A1>())));
@@ -102,11 +101,10 @@
}
-test_suite* init_unit_test_suite(int, char*[])
+int main( )
{
- test_suite* test = BOOST_TEST_SUITE("tuple");
- test->add(BOOST_TEST_CASE(&explicit_convert_to));
- test->add(BOOST_TEST_CASE(&explicit_assign_to));
- return test;
+ explicit_convert_to();
+ explicit_assign_to();
+ return boost::report_errors();
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk