|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r70164 - in sandbox/assign_v2/libs/assign/v2/test/ref: . aux_
From: erwann.rogard_at_[hidden]
Date: 2011-03-18 19:46:05
Author: e_r
Date: 2011-03-18 19:46:04 EDT (Fri, 18 Mar 2011)
New Revision: 70164
URL: http://svn.boost.org/trac/boost/changeset/70164
Log:
upd assign_v2
Added:
sandbox/assign_v2/libs/assign/v2/test/ref/aux_/convert_traits.cpp
- copied unchanged from r70162, /sandbox/assign_v2/libs/assign/v2/test/ref/convert_traits.cpp
sandbox/assign_v2/libs/assign/v2/test/ref/aux_/convert_traits.h
- copied unchanged from r70157, /sandbox/assign_v2/libs/assign/v2/test/ref/convert_traits.h
sandbox/assign_v2/libs/assign/v2/test/ref/aux_/list.cpp
- copied unchanged from r70162, /sandbox/assign_v2/libs/assign/v2/test/ref/list.cpp
sandbox/assign_v2/libs/assign/v2/test/ref/aux_/list.h
- copied unchanged from r70157, /sandbox/assign_v2/libs/assign/v2/test/ref/list.h
sandbox/assign_v2/libs/assign/v2/test/ref/aux_/list_tuple.cpp
- copied unchanged from r70162, /sandbox/assign_v2/libs/assign/v2/test/ref/list_tuple.cpp
Removed:
sandbox/assign_v2/libs/assign/v2/test/ref/convert_traits.cpp
sandbox/assign_v2/libs/assign/v2/test/ref/convert_traits.h
sandbox/assign_v2/libs/assign/v2/test/ref/list.cpp
sandbox/assign_v2/libs/assign/v2/test/ref/list.h
sandbox/assign_v2/libs/assign/v2/test/ref/list_tuple.cpp
Deleted: sandbox/assign_v2/libs/assign/v2/test/ref/convert_traits.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/convert_traits.cpp 2011-03-18 19:46:04 EDT (Fri, 18 Mar 2011)
+++ (empty file)
@@ -1,33 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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/ref/aux_/convert_traits/checking.hpp>
-#include <libs/assign/v2/test/ref/convert_traits.h>
-
-namespace test_assign_v2{
-namespace xxx_ref{
-namespace xxx_convert_traits{
-
- // --User may skip this file-- //
- // It checks internal details. //
- // --------------------------- //
-
- void test()
- {
- using namespace boost;
- namespace as2 = assign::v2;
- namespace ns = as2::ref::convert_traits::checking;
- {
- ns::same_value_type::do_check<int>();
- }
- }
-
-}// convert_traits
-}// ref
-}// test_assign
Deleted: sandbox/assign_v2/libs/assign/v2/test/ref/convert_traits.h
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/convert_traits.h 2011-03-18 19:46:04 EDT (Fri, 18 Mar 2011)
+++ (empty file)
@@ -1,24 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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 BOOST_ASSIGN_V2_TEST_REF_CONVERT_TRAITS_ER_2010_H
-#define BOOST_ASSIGN_V2_TEST_REF_CONVERT_TRAITS_ER_2010_H
-
-namespace test_assign_v2{
-namespace xxx_ref{
-namespace xxx_convert_traits{
-
- void test();
-
-}// xxx_convert_traits
-}// xxx_ref
-}// test_assign
-
-#endif
-
Deleted: sandbox/assign_v2/libs/assign/v2/test/ref/list.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/list.cpp 2011-03-18 19:46:04 EDT (Fri, 18 Mar 2011)
+++ (empty file)
@@ -1,142 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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 <boost/array.hpp>
-#include <boost/assign/v2/detail/config/check.hpp>
-#include <boost/assign/v2/ref/wrapper/copy.hpp>
-#include <boost/assign/v2/ref/aux_/list.hpp>
-#include <boost/mpl/apply.hpp>
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/int.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/type_traits/add_reference.hpp>
-#include <libs/assign/v2/test/ref/list.h>
-
-namespace test_assign_v2{
-namespace xxx_ref{
-namespace xxx_list{
-
- // --User may skip this file-- //
- // It checks internal details. //
- // --------------------------- //
-
- void test()
- {
- using namespace boost;
- namespace as2 = assign::v2;
- typedef use_default tag_;
- typedef std::string str_;
- {
- typedef int t0_;
- typedef int const t1_;
- typedef const char t2_ [2];
- typedef add_reference<t0_>::type r0_;
-
-
-/* // TODO possible extension
-#ifndef BOOST_NO_RVALUE_REFERENCES
- typedef int r1_;
-#else*/
- typedef add_reference<t1_>::type r1_;
-//#endif
- typedef add_reference<t2_>::type r2_;
-
- t0_ a = 0;
-#define B 2
- t2_ c = "c";
-
- typedef as2::ref::nth_result_of::list<tag_> result_;
- typedef mpl::apply1<result_,
- mpl::vector<r0_, r1_, r2_>
- >::type ar_;
- ar_ ar = as2::ref::list<tag_>( as2::_nil )( a )( B )( c );
- // TODO GCC4.4 wants fully qual
- // using namespace as2::ref;
- BOOST_ASSIGN_V2_CHECK( &as2::ref::at<0>( ar ) == &a );
- BOOST_ASSIGN_V2_CHECK( as2::ref::at<1>( ar ) == B );
- BOOST_ASSIGN_V2_CHECK( str_( as2::ref::at<2>( ar ) ) == c );
-#undef B
- }
- {
- typedef int t_; typedef add_reference<t_>::type r_;
- t_ a = 0;
- t_ b = 1;
- t_ c = 2;
- typedef as2::ref::copy_wrapper<t_>::type w_;
- typedef array<w_,3> arw_;
- typedef as2::ref::nth_result_of::list<tag_> result_;
- typedef mpl::apply1<result_,
- mpl::vector<r_, r_, r_>
- >::type ar_;
- ar_ ar = as2::ref::list<tag_>( as2::_nil )( a )( b )( c );
- arw_ arw;
- assign_array( arw, ar );
- BOOST_ASSIGN_V2_CHECK( &arw[ 0 ].get() == &a );
- BOOST_ASSIGN_V2_CHECK( &arw[ 1 ].get() == &b );
- BOOST_ASSIGN_V2_CHECK( &arw[ 2 ].get() == &c );
- }
- {
- typedef as2::ref::alloc_tag::lazy_alloc tag_;
- typedef as2::ref::list_aux::void_ void_;
- typedef as2::ref::list_aux::nil nil_;
- typedef as2::ref::empty_list<tag_>::type empty_;
- {
- typedef void_ u1_; typedef nil_ l_;
- typedef as2::ref::list_aux::policy_helper3<
- u1_, l_
- >::type value_;
- BOOST_MPL_ASSERT((is_same<value_, u1_>));
- typedef mpl::apply2<
- as2::ref::list_aux::policy<tag_>,
- as2::ref::list_aux::void_,
- as2::ref::list_aux::nil
- >::type po_; // just see that it compiles
- }
- {
- typedef as2::ref::nth_result_of::list<tag_> result_;
- typedef empty_ l_;
- {
- typedef int u1_;
- typedef as2::ref::list_aux::policy_helper3<
- u1_, l_
- >::type val_;
- BOOST_MPL_ASSERT(( is_same<val_, int> ));
- }
- {
- typedef int const u1_;
- typedef as2::ref::list_aux::policy_helper3<
- u1_, l_
- >::type val_;
- BOOST_MPL_ASSERT(( is_same<val_, int const> ));
- }
- }
-
- }
- {
- typedef int t_; typedef add_reference<t_>::type r_;
- t_ a = 0;
- t_ b = 1;
- t_ c = 2;
- typedef as2::ref::alloc_tag::lazy_alloc tag_;
- typedef as2::ref::nth_result_of::list<tag_> result_;
- typedef mpl::apply1<result_,
- mpl::vector<r_, r_, r_>
- >::type ar_;
- ar_ ar = as2::ref::list<tag_>( as2::_nil )( a )( b )( c );
-
- BOOST_ASSIGN_V2_CHECK( &ar[ 0 ].get() == &a );
- BOOST_ASSIGN_V2_CHECK( &ar[ 1 ].get() == &b );
- BOOST_ASSIGN_V2_CHECK( &ar[ 2 ].get() == &c );
- }
- }
-
-}// xxx_list
-}// xxx_ref
-}// test_assign
Deleted: sandbox/assign_v2/libs/assign/v2/test/ref/list.h
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/list.h 2011-03-18 19:46:04 EDT (Fri, 18 Mar 2011)
+++ (empty file)
@@ -1,23 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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 BOOST_ASSIGN_V2_TEST_REF_LIST_ER_2010_H
-#define BOOST_ASSIGN_V2_TEST_REF_LIST_ER_2010_H
-
-namespace test_assign_v2{
-namespace xxx_ref{
-namespace xxx_list{
-
- void test();
-
-}// xxx_list
-}// xxx_ref
-}// test_assign
-
-#endif
Deleted: sandbox/assign_v2/libs/assign/v2/test/ref/list_tuple.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/list_tuple.cpp 2011-03-18 19:46:04 EDT (Fri, 18 Mar 2011)
+++ (empty file)
@@ -1,200 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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 <assert.h>
-#include <string>
-#include <boost/mpl/vector/vector0.hpp>
-#include <boost/mpl/vector/vector10.hpp>
-#include <boost/assign/v2/detail/config/check.hpp>
-#include <boost/assign/v2/ref/aux_/list_tuple.hpp>
-
-#include <boost/type_traits/add_reference.hpp>
-
-namespace test_assign_v2{
-namespace xxx_ref{
-namespace xxx_list_tuple{
-
- // --User may skip this file-- //
- // It checks internal details. //
- // --------------------------- //
-
- void test()
- {
- namespace as2 = boost::assign::v2;
-
- #if BOOST_ASSIGN_V2_ENABLE_CPP0X
- #define BOOST_ASSIGN_V2_USING_GET using as2::ref::get;
- #else
- #define BOOST_ASSIGN_V2_USING_GET using boost::get;
- #endif
-
- typedef boost::mpl::int_<0> i0_;
- typedef boost::mpl::int_<1> i1_;
- typedef boost::mpl::int_<2> i2_;
- typedef boost::mpl::int_<3> i3_;
-
- #define A 1
- #define B 2
- int a = A;
- int b = B;
-#if BOOST_ASSIGN_V2_ENABLE_CPP0X
- typedef int& lvalue_;
- typedef int const& clvalue_;
- typedef int rvalue_;
-#else
- typedef int lvalue_;
- typedef int const clvalue_;
- typedef int const rvalue_;
-#endif
- {
- typedef boost::mpl::vector0<> v0_;
-
- typedef as2::ref::nth_result_of::list_tuple meta_result_;
- typedef boost::mpl::vector2<
- v0_,
- v0_
- > input_;
-
- typedef boost::mpl::apply1<
- meta_result_,
- input_
- >::type result_;
-
- result_ list = as2::ref::list_tuple()();
-
- }
- {
- typedef boost::mpl::vector1<lvalue_> v0_;
- typedef boost::mpl::vector1<rvalue_> v1_;
-
- typedef as2::ref::nth_result_of::list_tuple meta_result_;
- typedef boost::mpl::vector4<
- v0_,
- v1_,
- v0_,
- v1_
- > input_;
-
- typedef boost::mpl::apply1<
- meta_result_,
- input_
- >::type result_;
-
- result_ list = as2::ref::list_tuple( a )( A )( b )( B );
- BOOST_ASSIGN_V2_USING_GET
- BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i0_() ) ) == &a );
- BOOST_ASSIGN_V2_CHECK( get<0>( list.get( i1_() ) ) == A );
- BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i2_() ) ) == &b );
- BOOST_ASSIGN_V2_CHECK( get<0>( list.get( i3_() ) ) == B );
-
- result_ list2 = list;
- BOOST_ASSIGN_V2_CHECK( &get<0>( list2.get( i0_() ) ) == &a );
- BOOST_ASSIGN_V2_CHECK( get<0>( list2.get( i1_() ) ) == A );
- BOOST_ASSIGN_V2_CHECK( &get<0>( list2.get( i2_() ) ) == &b );
- BOOST_ASSIGN_V2_CHECK( get<0>( list2.get( i3_() ) ) == B );
-
- }
- {
- typedef boost::mpl::vector2<lvalue_, lvalue_> v0_;
- typedef boost::mpl::vector2<lvalue_, rvalue_> v1_;
- typedef boost::mpl::vector2<rvalue_, lvalue_> v2_;
- typedef boost::mpl::vector2<rvalue_, rvalue_> v3_;
-
- typedef as2::ref::nth_result_of::list_tuple meta_result_;
- typedef boost::mpl::vector4<
- v0_,
- v1_,
- v2_,
- v3_
- > input_;
-
- typedef boost::mpl::apply1<
- meta_result_,
- input_
- >::type result_;
-
- result_ list
- = as2::ref::list_tuple( a, b )( a, B )( A, b )( A, B );
- BOOST_ASSIGN_V2_USING_GET
- BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i0_() ) ) == &a );
- BOOST_ASSIGN_V2_CHECK( &get<1>( list.get( i0_() ) ) == &b );
- BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i1_() ) ) == &a );
- BOOST_ASSIGN_V2_CHECK( get<1>( list.get( i1_() ) ) == B );
- BOOST_ASSIGN_V2_CHECK( get<0>( list.get( i2_() ) ) == A );
- BOOST_ASSIGN_V2_CHECK( &get<1>( list.get( i2_() ) ) == &b );
- BOOST_ASSIGN_V2_CHECK( get<0>( list.get( i3_() ) ) == A );
- BOOST_ASSIGN_V2_CHECK( get<1>( list.get( i3_() ) ) == B );
-
- }
- {
- typedef boost::mpl::vector2<lvalue_, lvalue_> v0_;
- typedef boost::mpl::vector2<lvalue_, clvalue_> v1_;
- typedef boost::mpl::vector2<clvalue_, lvalue_> v2_;
- typedef boost::mpl::vector2<clvalue_, clvalue_> v3_;
-
- typedef as2::ref::nth_result_of::list_tuple meta_result_;
- typedef boost::mpl::vector4<
- v0_,
- v1_,
- v2_,
- v3_
- > input_;
-
- typedef boost::mpl::apply1<
- meta_result_,
- input_
- >::type result_;
-
- int const aa = A;
- int const bb = B;
-
- result_ list
- = as2::ref::list_tuple( a, b )( a, bb )( aa, b )( aa, bb );
- BOOST_ASSIGN_V2_USING_GET
- BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i0_() ) ) == &a );
- BOOST_ASSIGN_V2_CHECK( &get<1>( list.get( i0_() ) ) == &b );
- BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i1_() ) ) == &a );
- BOOST_ASSIGN_V2_CHECK( &get<1>( list.get( i1_() ) ) == &bb );
- BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i2_() ) ) == &aa );
- BOOST_ASSIGN_V2_CHECK( &get<1>( list.get( i2_() ) ) == &b );
- BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i3_() ) ) == &aa );
- BOOST_ASSIGN_V2_CHECK( &get<1>( list.get( i3_() ) ) == &bb );
- }
-
- #undef A
- #undef B
-
- {
- typedef const char ar_[2];
- #if BOOST_ASSIGN_V2_ENABLE_CPP0X
- typedef boost::add_reference<ar_>::type type;
- #else
- typedef ar_ type;
- #endif
- typedef boost::mpl::vector1<type> v0_;
-
- typedef as2::ref::nth_result_of::list_tuple meta_result_;
- typedef boost::mpl::vector1<v0_> input_;
-
- typedef boost::mpl::apply1<meta_result_, input_>::type result_;
-
- result_ list = as2::ref::list_tuple( "x" );
- typedef std::string str_;
- BOOST_ASSIGN_V2_USING_GET
- BOOST_ASSIGN_V2_CHECK(
- str_( get<0>( list.get( i0_() ) ) ) == "x" );
- BOOST_ASSIGN_V2_CHECK(
- str_( get<0>( list.get( i0_() ) ) ) != "y" );
- }
- #undef BOOST_ASSIGN_V2_USING_GET
- }// test
-
-}// xxx_list_tuple
-}// xxx_ref
-}// test_assign_v2
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