|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r69787 - in sandbox/assign_v2/libs/assign/v2/test/ref: . array
From: erwann.rogard_at_[hidden]
Date: 2011-03-09 16:09:26
Author: e_r
Date: 2011-03-09 16:09:23 EST (Wed, 09 Mar 2011)
New Revision: 69787
URL: http://svn.boost.org/trac/boost/changeset/69787
Log:
upd assign_v2
Text files modified:
sandbox/assign_v2/libs/assign/v2/test/ref/array.cpp | 62 +++++++++++++++++++++++++++-
sandbox/assign_v2/libs/assign/v2/test/ref/array/csv.cpp | 82 ---------------------------------------
sandbox/assign_v2/libs/assign/v2/test/ref/array/csv.h | 26 ------------
sandbox/assign_v2/libs/assign/v2/test/ref/array/functor.cpp | 83 ---------------------------------------
sandbox/assign_v2/libs/assign/v2/test/ref/array/functor.h | 26 ------------
5 files changed, 62 insertions(+), 217 deletions(-)
Modified: sandbox/assign_v2/libs/assign/v2/test/ref/array.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/array.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/ref/array.cpp 2011-03-09 16:09:23 EST (Wed, 09 Mar 2011)
@@ -7,8 +7,14 @@
// 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/ref/array/functor.h>
-#include <libs/assign/v2/test/ref/array/csv.h>
+#include <vector>
+#include <boost/next_prior.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+
+#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign/v2/ref/array/array.hpp>
#include <libs/assign/v2/test/ref/array.h>
namespace test_assign_v2{
@@ -17,8 +23,56 @@
void test()
{
- xxx_functor::test();
- xxx_csv::test();
+ namespace as2 = boost::assign::v2;
+ {
+ //[ref_array_r
+ typedef int const T;
+ T w = 11, x = 72, y = 31, z = 48;
+ as2::ref::nth_result_of::array<3, T>::type ar3 = as2::ref::array( w )( x )( y );
+ {
+ T& a = ar3.front(); T& b = ar3.back();
+
+ BOOST_ASSIGN_V2_CHECK( &a == &w );
+ BOOST_ASSIGN_V2_CHECK( &b == &y );
+ }
+ as2::ref::nth_result_of::array<4, T>::type ar4 = ar3( z );
+ {
+ T& a = ar4.front(); T& b = ar4.back();
+
+ BOOST_ASSIGN_V2_CHECK( &a == &w );
+ BOOST_ASSIGN_V2_CHECK( &b == &z );
+ }
+ //]
+ {
+ T& a = ( *boost::begin( ar4 ) );
+ T& b = *boost::next( boost::begin( ar4 ), ar4.size() - 1 );
+
+ BOOST_ASSIGN_V2_CHECK( &a == &w );
+ BOOST_ASSIGN_V2_CHECK( &b == &z );
+ }
+ }
+ {
+ //[ref_array_w
+ typedef int T; T x, y, z;
+ std::vector<T> r( 3 ); r[0] = 72; r[1] = 31; r[2] = 48;
+ boost::copy( r, boost::begin(
+ as2::ref::array( x )( y )( z ) | as2::ref::_get
+ )
+ );
+
+ BOOST_ASSIGN_V2_CHECK( x == r[0] );
+ BOOST_ASSIGN_V2_CHECK( z == r[2] );
+ //]
+ }
+ {
+ //[ref_array_assign
+ typedef int T; T x, y, z;
+ as2::ref::array( x )( y )( z ).assign( -1 );
+
+ BOOST_ASSIGN_V2_CHECK( x == -1 );
+ BOOST_ASSIGN_V2_CHECK( z == -1 );
+ //]
+ }
}
}// xxx_array
Modified: sandbox/assign_v2/libs/assign/v2/test/ref/array/csv.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/array/csv.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/ref/array/csv.cpp 2011-03-09 16:09:23 EST (Wed, 09 Mar 2011)
@@ -1,81 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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/range/begin.hpp>
-#include <boost/range/algorithm/copy.hpp>
-#include <boost/typeof/typeof.hpp>
-#include <boost/assign/v2/detail/config/check.hpp>
-#include <boost/assign/v2/ref/array/csv_array.hpp>
-#include <boost/assign/v2/ref/wrapper.hpp>
-#include <libs/assign/v2/test/ref/array/csv.h>
-
-namespace test_assign_v2{
-namespace xxx_ref{
-namespace xxx_array{
-namespace xxx_csv{
-
- void test()
- {
- namespace as2 = boost::assign::v2;
- {
- //[ref_csv_array
- typedef int const T;
- T x = 72, y = 31, z = 48;
- typedef as2::ref::nth_result_of::csv_array<3, T>::type ar_;
- ar_ ar = as2::ref::csv_array( x, y, z );
- {
- T& a = ar[0]; T& b = ar[2];
-
- BOOST_ASSIGN_V2_CHECK( &a == &x );
- BOOST_ASSIGN_V2_CHECK( &b == &z );
- }
- //]
- {
- T& a = ar.front(); T& b = ar.back();
-
- BOOST_ASSIGN_V2_CHECK( &a == &x );
- BOOST_ASSIGN_V2_CHECK( &b == &z );
- }
- {
- T& a = (*boost::begin( ar ) );
- T& b = *boost::next( boost::begin( ar ), 2 );
-
- BOOST_ASSIGN_V2_CHECK( &a == &x );
- BOOST_ASSIGN_V2_CHECK( &b == &z );
- }
- }
- {
- //[ref_csv_array_w
- typedef int T; T x, y, z;
- std::vector<T> r( 3 ); r[0] = 72; r[1] = 31; r[2] = 48;
- boost::copy( r, boost::begin(
- as2::ref::csv_array( x, y, z ) | as2::ref::_get
- )
- );
-
- BOOST_ASSIGN_V2_CHECK( x == r[0] );
- BOOST_ASSIGN_V2_CHECK( z == r[2] );
- //]
- }
- {
- //[ref_csv_array_assign
- typedef int T; T x, y, z;
- as2::ref::csv_array( x, y, z ).assign( -1 );
-
- BOOST_ASSIGN_V2_CHECK( x == -1 );
- BOOST_ASSIGN_V2_CHECK( z == -1 );
- //]
- }
- }
-
-}// xxx_csv
-}// xxx_array
-}// xxx_ref
-}// test_assign
+// TODO remove file
\ No newline at end of file
Modified: sandbox/assign_v2/libs/assign/v2/test/ref/array/csv.h
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/array/csv.h (original)
+++ sandbox/assign_v2/libs/assign/v2/test/ref/array/csv.h 2011-03-09 16:09:23 EST (Wed, 09 Mar 2011)
@@ -1,25 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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_ARRAY_CSV_ER_2010_H
-#define BOOST_ASSIGN_V2_TEST_REF_ARRAY_CSV_ER_2010_H
-
-namespace test_assign_v2{
-namespace xxx_ref{
-namespace xxx_array{
-namespace xxx_csv{
-
- void test();
-
-}// xxx_csv
-}// xxx_array
-}// xxx_ref
-}// test_assign
-
-#endif
+// TODO remove file
\ No newline at end of file
Modified: sandbox/assign_v2/libs/assign/v2/test/ref/array/functor.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/array/functor.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/ref/array/functor.cpp 2011-03-09 16:09:23 EST (Wed, 09 Mar 2011)
@@ -1,82 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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/next_prior.hpp>
-#include <boost/range/begin.hpp>
-#include <boost/range/end.hpp>
-
-#include <boost/assign/v2/detail/config/check.hpp>
-#include <boost/range/algorithm/copy.hpp>
-#include <boost/assign/v2/ref/array/array.hpp>
-#include <libs/assign/v2/test/ref/array/functor.h>
-
-namespace test_assign_v2{
-namespace xxx_ref{
-namespace xxx_array{
-namespace xxx_functor{
-
- void test()
- {
- namespace as2 = boost::assign::v2;
- {
- //[ref_array_r
- typedef int const T;
- T w = 11, x = 72, y = 31, z = 48;
- as2::ref::nth_result_of::array<3, T>::type ar3 = as2::ref::array( w )( x )( y );
- {
- T& a = ar3.front(); T& b = ar3.back();
-
- BOOST_ASSIGN_V2_CHECK( &a == &w );
- BOOST_ASSIGN_V2_CHECK( &b == &y );
- }
- as2::ref::nth_result_of::array<4, T>::type ar4 = ar3( z );
- {
- T& a = ar4.front(); T& b = ar4.back();
-
- BOOST_ASSIGN_V2_CHECK( &a == &w );
- BOOST_ASSIGN_V2_CHECK( &b == &z );
- }
- //]
- {
- T& a = ( *boost::begin( ar4 ) );
- T& b = *boost::next( boost::begin( ar4 ), ar4.size() - 1 );
-
- BOOST_ASSIGN_V2_CHECK( &a == &w );
- BOOST_ASSIGN_V2_CHECK( &b == &z );
- }
- }
- {
- //[ref_array_w
- typedef int T; T x, y, z;
- std::vector<T> r( 3 ); r[0] = 72; r[1] = 31; r[2] = 48;
- boost::copy( r, boost::begin(
- as2::ref::array( x )( y )( z ) | as2::ref::_get
- )
- );
-
- BOOST_ASSIGN_V2_CHECK( x == r[0] );
- BOOST_ASSIGN_V2_CHECK( z == r[2] );
- //]
- }
- {
- //[ref_array_assign
- typedef int T; T x, y, z;
- as2::ref::array( x )( y )( z ).assign( -1 );
-
- BOOST_ASSIGN_V2_CHECK( x == -1 );
- BOOST_ASSIGN_V2_CHECK( z == -1 );
- //]
- }
- }
-
-}// xxx_functor
-}// xxx_array
-}// xxx_ref
-}// test_assign
+// TODO remove file
\ No newline at end of file
Modified: sandbox/assign_v2/libs/assign/v2/test/ref/array/functor.h
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/array/functor.h (original)
+++ sandbox/assign_v2/libs/assign/v2/test/ref/array/functor.h 2011-03-09 16:09:23 EST (Wed, 09 Mar 2011)
@@ -1,25 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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_ARRAY_FUNCTOR_ER_2010_H
-#define BOOST_ASSIGN_V2_TEST_REF_ARRAY_FUNCTOR_ER_2010_H
-
-namespace test_assign_v2{
-namespace xxx_ref{
-namespace xxx_array{
-namespace xxx_functor{
-
- void test();
-
-}// xxx_functor
-}// xxx_array
-}// xxx_ref
-}// test_assign
-
-#endif
+// TODO remove file
\ No newline at end of file
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