Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67944 - in sandbox/statistics/support/libs/assign/v2/test: . detail detail/traits misc put/pipe unit_testing
From: erwann.rogard_at_[hidden]
Date: 2011-01-10 23:32:39


Author: e_r
Date: 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
New Revision: 67944
URL: http://svn.boost.org/trac/boost/changeset/67944

Log:
upd libs/assign/v2
Added:
   sandbox/statistics/support/libs/assign/v2/test/detail/
   sandbox/statistics/support/libs/assign/v2/test/detail/functor.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/detail/functor.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/detail/traits/
   sandbox/statistics/support/libs/assign/v2/test/detail/traits.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/detail/traits.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_push.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_push.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_static_size.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_static_size.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_value_type.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_value_type.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/misc/
   sandbox/statistics/support/libs/assign/v2/test/misc.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/misc.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/misc/chain.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/misc/chain.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/misc/convert.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/misc/convert.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/range.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/range.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/unit_testing/misc.cpp (contents, props changed)

Added: sandbox/statistics/support/libs/assign/v2/test/detail/functor.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/detail/functor.cpp 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,145 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#include <string>
+#include <iostream>
+#include <boost/preprocessor/arithmetic/sub.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/control/expr_if.hpp>
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/repetition/enum_trailing.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/tuple/tuple.hpp>
+
+#include <boost/assign/v2/detail/config/tuple_limit_arity.hpp>
+#include <boost/assign/v2/detail/checking/check.hpp>
+#include <boost/assign/v2/detail/functor/constructor.hpp>
+
+#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+// do nothing
+#else
+#include <boost/assign/v2/detail/config/limit_lvalue_const_arity.hpp>
+#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <libs/assign/v2/test/detail/functor.h>
+
+namespace test_assign_v2{
+namespace xxx_detail{
+namespace xxx_functor{
+
+ void test(){
+ using namespace boost::assign::v2;
+
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+#define BOOST_ASSIGN_V2_n BOOST_ASSIGN_V2_CPP03_TUPLE_LIMIT_ARITY
+// That's because we are constructing a boost::tuple<>.
+#else
+#define BOOST_ASSIGN_V2_n BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY
+
+#if BOOST_ASSIGN_V2_n > BOOST_ASSIGN_V2_CPP03_TUPLE_LIMIT_ARITY
+#error
+#endif
+
+#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+
+ {
+ typedef int& x_ref_;
+ typedef int const& y_ref_;
+ typedef int z_;
+
+#define MACRO(Z, n, data) data
+
+ typedef boost::tuple<
+ BOOST_PP_EXPR_IF(
+ BOOST_ASSIGN_V2_n,
+ x_ref_
+ )
+ BOOST_PP_ENUM_TRAILING(
+ BOOST_PP_IF(BOOST_PP_DEC(BOOST_ASSIGN_V2_n),1,0),
+ MACRO,
+ y_ref_
+ )
+ BOOST_PP_ENUM_TRAILING(
+ BOOST_PP_SUB(BOOST_ASSIGN_V2_n,2),
+ MACRO,
+ z_
+ )
+ > t_;
+#undef MACRO
+
+ typedef functor_aux::constructor<t_> f_;
+ f_ f;
+
+ int x = -1;
+ int const y = 0;
+
+#define MACRO(z, n, data) data
+
+ t_ t = f(
+ BOOST_PP_EXPR_IF(
+ BOOST_ASSIGN_V2_n,
+ x
+ )
+ BOOST_PP_ENUM_TRAILING(
+ BOOST_PP_IF(BOOST_PP_DEC(BOOST_ASSIGN_V2_n),1,0),
+ MACRO,
+ y
+ )
+ BOOST_PP_ENUM_TRAILING(
+ BOOST_PP_SUB(BOOST_ASSIGN_V2_n, 2),
+ MACRO,
+ 1
+ )
+ );
+#undef MACRO
+ BOOST_PP_EXPR_IF(
+ BOOST_ASSIGN_V2_n,
+ BOOST_ASSIGN_V2_CHECK(
+ &boost::get<0>( t ) == &x
+ );
+ )
+ BOOST_PP_EXPR_IF(
+ BOOST_PP_DEC(BOOST_ASSIGN_V2_n),
+ BOOST_ASSIGN_V2_CHECK(
+ &boost::get<1>( t ) == &y
+ );
+ )
+
+#define MACRO(z, i, data ) \
+ BOOST_ASSIGN_V2_CHECK( \
+ boost::get< BOOST_PP_ADD(i,2) >( t ) == 1 \
+ ); \
+/**/
+
+ BOOST_PP_REPEAT(
+ BOOST_PP_SUB(BOOST_ASSIGN_V2_n,2),
+ MACRO,
+ ~
+ )
+#undef MACRO
+
+ typedef std::string str_;
+ const str_ cpp
+ = BOOST_ASSIGN_V2_ENABLE_CPP0X ? "C++0x" : "C++03";
+ const str_ str = str_("test_assign_v2::xxx_detail::xxx_functor")
+ + "{ " + cpp + ", arity = ";
+
+ std::cout
+ << str
+ << BOOST_ASSIGN_V2_n
+ << " }"
+ << std::endl;
+
+#undef BOOST_ASSIGN_V2_n
+ }
+ }
+
+}// xxx_functor
+}// xxx_detail
+}// test_assign_v2

Added: sandbox/statistics/support/libs/assign/v2/test/detail/functor.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/detail/functor.h 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,23 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef LIBS_ASSIGN_V2_TEST_DETAIL_FUNCTOR_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_DETAIL_FUNCTOR_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_detail{
+namespace xxx_functor{
+
+ void test();
+
+}// xxx_functor
+}// xxx_detail
+}// test_assign_v2
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/detail/traits.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/detail/traits.cpp 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,28 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#include <libs/assign/v2/test/detail/traits/has_push.h>
+#include <libs/assign/v2/test/detail/traits/has_static_size.h>
+#include <libs/assign/v2/test/detail/traits/has_value_type.h>
+#include <libs/assign/v2/test/type_traits.h>
+
+namespace test_assign_v2{
+namespace xxx_detail{
+namespace xxx_traits{
+
+ void test(){
+ xxx_has_push::test();
+ xxx_has_static_size::test();
+ xxx_has_value_type::test();
+ }
+
+}// xxx_traits
+}// xxx_detail
+}// xxx_test_assign
+

Added: sandbox/statistics/support/libs/assign/v2/test/detail/traits.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/detail/traits.h 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,23 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef LIBS_ASSIGN_V2_TEST_DETAIL_TRAITS_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_DETAIL_TRAITS_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_detail{
+namespace xxx_traits{
+
+ void test();
+
+}// xxx_traits
+}// xxx_detail
+}// test_assign_v2
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_push.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_push.cpp 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,47 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#include <vector>
+#include <stack>
+#include <queue>
+#include <boost/static_assert.hpp>
+#include <boost/assign/v2/detail/traits/container/has_push.hpp>
+#include <libs/assign/v2/test/detail/traits/has_push.h>
+
+namespace test_assign_v2{
+namespace xxx_detail{
+namespace xxx_traits{
+namespace xxx_has_push{
+
+ void test()
+ {
+ namespace as2 = boost::assign::v2;
+ namespace ns = as2::container_traits;
+ {
+ typedef std::queue<int> v_;
+ typedef ns::has_push<v_> has_push_;
+ BOOST_STATIC_ASSERT( has_push_::value );
+ }
+ {
+ typedef std::stack<int> v_;
+ typedef ns::has_push<v_> has_push_;
+ BOOST_STATIC_ASSERT( has_push_::value );
+ }
+ {
+ typedef std::vector<int> v_;
+ typedef ns::has_push<v_> has_push_;
+ BOOST_STATIC_ASSERT( !has_push_::value );
+ }
+ }
+
+}// xxx_has_push
+}// xxx_detail
+}// xxx_type_traits
+}// test_assign_v2
+

Added: sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_push.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_push.h 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,26 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef LIBS_ASSIGN_V2_TEST_DETAIL_TRAITS_HAS_PUSH_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_DETAIL_TRAITS_HAS_PUSH_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_detail{
+namespace xxx_traits{
+namespace xxx_has_push{
+
+ void test();
+
+}// xxx_has_push
+}// xxx_traits
+}// detail
+}// test_assign_v2
+
+#endif
+

Added: sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_static_size.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_static_size.cpp 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,49 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#include <cstddef>
+#include <boost/array.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/assign/v2/detail/traits/container/has_static_size.hpp>
+#include <boost/assign/v2/ref/array/functor.hpp>
+#include <libs/assign/v2/test/detail/traits/has_static_size.h>
+
+struct my_cont{
+ typedef std::size_t size_type;
+};
+
+namespace test_assign_v2{
+namespace xxx_detail{
+namespace xxx_traits{
+namespace xxx_has_static_size{
+
+ void test()
+ {
+ namespace as2 = boost::assign::v2;
+ {
+ typedef boost::array<int,1> cont_;
+ typedef as2::container_traits::has_static_size<cont_> pred_;
+ BOOST_STATIC_ASSERT( pred_::value );
+ }
+ {
+ typedef as2::ref::result_of::empty_array<int>::type cont_;
+ typedef as2::container_traits::has_static_size<cont_> pred_;
+ BOOST_STATIC_ASSERT( pred_::value );
+ }
+ {
+ typedef my_cont cont_;
+ typedef as2::container_traits::has_static_size<cont_> pred_;
+ BOOST_STATIC_ASSERT( !pred_::value );
+ }
+ }
+
+}// xxx_has_static_size
+}// xxx_traits
+}// xxx_detail
+}// test_assign_v2

Added: sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_static_size.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_static_size.h 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef LIBS_ASSIGN_V2_TEST_DETAIL_TRAITS_HAS_STATIC_SIZE_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_DETAIL_TRAITS_HAS_STATIC_SIZE_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_detail{
+namespace xxx_traits{
+namespace xxx_has_static_size{
+
+ void test();
+
+}// xxx_has_static_size
+}// xxx_detail
+}// xxx_traits
+}// test_assign
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_value_type.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_value_type.cpp 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,40 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#include <vector>
+#include <cstddef>
+#include <boost/static_assert.hpp>
+#include <boost/assign/v2/detail/traits/type/has_value_type.hpp>
+#include <libs/assign/v2/test/detail/traits/has_value_type.h>
+
+namespace test_assign_v2{
+namespace xxx_detail{
+namespace xxx_traits{
+namespace xxx_has_value_type{
+
+ void test(){
+
+ namespace as2 = boost::assign::v2;
+ {
+ typedef std::vector<int> inp_;
+ typedef as2::type_traits::has_value_type<inp_>::type pred_;
+ BOOST_STATIC_ASSERT(pred_::value);
+ }
+ {
+ typedef int inp_;
+ typedef as2::type_traits::has_value_type<inp_>::type pred_;
+ BOOST_STATIC_ASSERT(!pred_::value);
+ }
+ }
+
+
+}// xxx_has_value_type
+}// xxx_traits
+}// xxx_detail
+}// test_assign

Added: sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_value_type.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/detail/traits/has_value_type.h 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef LIBS_ASSIGN_V2_TEST_DETAIL_TRAITS_HAS_VALUE_TYPE_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_DETAIL_TRAITS_HAS_VALUE_TYPE_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_detail{
+namespace xxx_traits{
+namespace xxx_has_value_type{
+
+ void test();
+
+}// xxx_has_value_type
+}// xxx_traits
+}// xxx_detail
+}// test_assign
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/misc.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/misc.cpp 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,24 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#include <libs/assign/v2/test/misc/chain.h>
+#include <libs/assign/v2/test/misc/convert.h>
+#include <libs/assign/v2/test/misc.h>
+
+namespace test_assign_v2{
+namespace xxx_misc{
+
+ void test(){
+ xxx_chain::test();
+ xxx_convert::test();
+ }
+
+}// xxx_type_traits
+}// xxx_test_assign
+

Added: sandbox/statistics/support/libs/assign/v2/test/misc.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/misc.h 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,21 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef LIBS_ASSIGN_V2_TEST_MISC_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_MISC_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_misc{
+
+ void test();
+
+}// xxx_misc
+}// xxx_test_assign
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/misc/chain.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/misc/chain.cpp 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,31 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#include <boost/assign/v2/chain/checking/twin_values.hpp>
+#include <boost/assign/v2/chain/checking/distinct_values.hpp>
+#include <libs/assign/v2/test/misc/chain.h>
+
+namespace test_assign_v2{
+namespace xxx_misc{
+namespace xxx_chain{
+
+ void test()
+ {
+ namespace as2 = boost::assign::v2;
+ namespace ns = as2::checking::chain;
+ ns::twin_values::do_check<int>();
+ ns::distinct_values::do_check<short>();
+ ns::distinct_values::do_check<int>();
+ ns::distinct_values::do_check<float>();
+ ns::distinct_values::do_check<double>();
+ }
+
+}// xxx_chain
+}// xxx_misc
+}// test_assign_v2

Added: sandbox/statistics/support/libs/assign/v2/test/misc/chain.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/misc/chain.h 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,23 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef LIBS_ASSIGN_V2_TEST_MISC_CHAIN_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_MISC_CHAIN_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_misc{
+namespace xxx_chain{
+
+ void test();
+
+}// xxx_chain
+}// xxx_misc
+}// test_assign_v2
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/misc/convert.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/misc/convert.cpp 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,45 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#include <vector>
+#include <boost/assign/v2/detail/checking/container.hpp>
+#include <boost/assign/v2/misc/convert/check.hpp>
+#include <libs/assign/v2/test/misc/convert.h>
+
+namespace test_assign_v2{
+namespace xxx_misc{
+namespace xxx_convert{
+
+ void test()
+ {
+ namespace as2 = boost::assign::v2;
+ namespace ns = as2::checking::convert;
+
+ std::vector<int> v;
+ {
+ using namespace as2::checking::constants;
+ v.push_back( a );
+ v.push_back( b );
+ v.push_back( c );
+ v.push_back( d );
+ v.push_back( e );
+ v.push_back( f );
+ v.push_back( g );
+ v.push_back( h );
+ }
+
+ // Any range will do, so need to check, say, csv_deque
+ ns::do_check( v );
+
+ }
+
+}// xxx_convert
+}// xxx_misc
+}// xxx_test_assign
+

Added: sandbox/statistics/support/libs/assign/v2/test/misc/convert.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/misc/convert.h 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,23 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef LIBS_ASSIGN_V2_TEST_MISC_CONVERT_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_MISC_CONVERT_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_misc{
+namespace xxx_convert{
+
+ void test();
+
+}// xxx_convert
+}// xxx_misc
+}// xxx_test_assign
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/range.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/range.cpp 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,68 @@
+////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+////////////////////////////////////////////////////////////////////////////
+#include <deque>
+#include <list>
+#include <map>
+#include <queue>
+#include <set>
+#include <stack>
+#include <vector>
+#include <boost/type.hpp>
+#include <boost/array.hpp>
+
+#include <boost/assign/v2/detail/checking/constants.hpp>
+#include <boost/assign/v2/detail/checking/container.hpp>
+#include <boost/assign/v2/put/pipe/range.hpp>
+
+#include <libs/assign/v2/test/put/pipe/range.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_range{
+
+ void test()
+ {
+ std::vector<int> from;
+ namespace as2 = boost::assign::v2;
+ {
+ using namespace as2::checking::constants;
+ from.push_back( a );
+ from.push_back( b );
+ from.push_back( c );
+ from.push_back( d );
+ from.push_back( e );
+ from.push_back( f );
+ from.push_back( g );
+ from.push_back( h );
+ }
+ {
+ namespace ns = as2::checking::put_range;
+ ns::do_check<boost::array<int,8> >( from );
+ ns::do_check<std::deque<int> >( from );
+ ns::do_check<std::list<int> >( from );
+ ns::do_check<std::queue<int> >( from );
+ ns::do_check<std::set<int> >( from );
+ ns::do_check<std::stack<int> >( from );
+ ns::do_check<std::vector<int> >( from );
+ }
+ {
+ typedef std::stack<int> cont_;
+ std::vector<int> v(2); v[0] = 1; v[1] = -99;
+ assert(
+ (boost::type<cont_>() | as2::_put_range( v ) ).top() == -99
+ );
+ }
+ }
+
+}// xxx_range
+}// xxx_pipe
+}// xxx_put
+}// test_assign_v2

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/range.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/range.h 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef LIBS_ASSIGN_V2_TEST_PUT_PIPE_RANGE_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_PIPE_RANGE_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_range{
+
+ void test();
+
+}// xxx_range
+}// xxx_pipe
+}// xxx_put
+}// test_assign_v2
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/unit_testing/misc.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/unit_testing/misc.cpp 2011-01-10 23:32:35 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,33 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef LIBS_ASSIGN_V2_TEST_UNIT_TEST_MISC_ER_2010_CPP
+#define LIBS_ASSIGN_V2_TEST_UNIT_TEST_MISC_ER_2010_CPP
+
+#include <iostream> // needed?
+
+#include <boost/test/test_tools.hpp>
+#define BOOST_ASSIGN_V2_CHECK( p ) BOOST_CHECK( p )
+#include <libs/assign/v2/test/misc/chain.cpp>
+#include <libs/assign/v2/test/misc/convert.cpp>
+#include <boost/test/unit_test.hpp>
+using boost::unit_test::test_suite;
+test_suite* init_unit_test_suite( int argc, char* argv[] )
+{
+ test_suite* test = BOOST_TEST_SUITE( "BOOST_ASSIGN_V2" );
+ using namespace test_assign_v2;
+ {
+ using namespace xxx_misc;
+ test->add( BOOST_TEST_CASE( &xxx_chain::test ) );
+ test->add( BOOST_TEST_CASE( &xxx_convert::test ) );
+ }
+ return test;
+}
+
+#endif


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