Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70502 - in sandbox/assign_v2/libs/assign/v2/test: . utility
From: erwann.rogard_at_[hidden]
Date: 2011-03-24 12:27:19


Author: e_r
Date: 2011-03-24 12:27:18 EDT (Thu, 24 Mar 2011)
New Revision: 70502
URL: http://svn.boost.org/trac/boost/changeset/70502

Log:
upd assign_v2
Added:
   sandbox/assign_v2/libs/assign/v2/test/chain.cpp
      - copied, changed from r70501, /sandbox/assign_v2/libs/assign/v2/test/utility/chain.cpp
   sandbox/assign_v2/libs/assign/v2/test/chain.h
      - copied unchanged from r70501, /sandbox/assign_v2/libs/assign/v2/test/utility/chain.h
   sandbox/assign_v2/libs/assign/v2/test/conversion.cpp
      - copied, changed from r70501, /sandbox/assign_v2/libs/assign/v2/test/utility/conversion.cpp
   sandbox/assign_v2/libs/assign/v2/test/csv.cpp
      - copied, changed from r70501, /sandbox/assign_v2/libs/assign/v2/test/utility/csv.cpp
Removed:
   sandbox/assign_v2/libs/assign/v2/test/utility/chain.cpp
   sandbox/assign_v2/libs/assign/v2/test/utility/chain.h
   sandbox/assign_v2/libs/assign/v2/test/utility/conversion.cpp
   sandbox/assign_v2/libs/assign/v2/test/utility/csv.cpp
Text files modified:
   sandbox/assign_v2/libs/assign/v2/test/chain.cpp | 6 +++---
   sandbox/assign_v2/libs/assign/v2/test/conversion.cpp | 4 ++--
   sandbox/assign_v2/libs/assign/v2/test/csv.cpp | 2 +-
   3 files changed, 6 insertions(+), 6 deletions(-)

Copied: sandbox/assign_v2/libs/assign/v2/test/chain.cpp (from r70501, /sandbox/assign_v2/libs/assign/v2/test/utility/chain.cpp)
==============================================================================
--- /sandbox/assign_v2/libs/assign/v2/test/utility/chain.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/chain.cpp 2011-03-24 12:27:18 EDT (Thu, 24 Mar 2011)
@@ -17,9 +17,9 @@
 #include <boost/range/algorithm/equal.hpp>
 #include <boost/assign/v2/ref/array/csv_array.hpp>
 #include <boost/assign/v2/deque/csv_deque.hpp>
-#include <boost/assign/v2/utility/chain/check.hpp>
-#include <boost/assign/v2/utility/chain.hpp>
-#include <boost/assign/v2/utility/chain/operator_and.hpp>
+#include <boost/assign/v2/chain/check.hpp>
+#include <boost/assign/v2/chain.hpp>
+#include <boost/assign/v2/chain/operator_and.hpp>
 #include <libs/assign/v2/test/utility/chain.h>
 
 namespace test_assign_v2{

Copied: sandbox/assign_v2/libs/assign/v2/test/conversion.cpp (from r70501, /sandbox/assign_v2/libs/assign/v2/test/utility/conversion.cpp)
==============================================================================
--- /sandbox/assign_v2/libs/assign/v2/test/utility/conversion.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/conversion.cpp 2011-03-24 12:27:18 EDT (Thu, 24 Mar 2011)
@@ -12,8 +12,8 @@
 #include <boost/array.hpp>
 #include <boost/assign/v2/detail/check/equal_container.hpp>
 #include <boost/assign/v2/detail/config/check.hpp>
-#include <boost/assign/v2/utility/conversion.hpp>
-#include <boost/assign/v2/utility/conversion/check.hpp>
+#include <boost/assign/v2/conversion.hpp>
+#include <boost/assign/v2/conversion/check.hpp>
 #include <boost/assign/v2/ref/array.hpp>
 #include <boost/assign/v2/deque.hpp>
 #include <boost/range/algorithm/equal.hpp>

Copied: sandbox/assign_v2/libs/assign/v2/test/csv.cpp (from r70501, /sandbox/assign_v2/libs/assign/v2/test/utility/csv.cpp)
==============================================================================
--- /sandbox/assign_v2/libs/assign/v2/test/utility/csv.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/csv.cpp 2011-03-24 12:27:18 EDT (Thu, 24 Mar 2011)
@@ -9,7 +9,7 @@
 //////////////////////////////////////////////////////////////////////////////
 #include <deque>
 #include <boost/assign/v2/detail/config/check.hpp>
-#include <boost/assign/v2/utility/csv.hpp>
+#include <boost/assign/v2/csv.hpp>
 #include <boost/assign/v2/deque.hpp>
 #include <boost/assign/v2/put.hpp>
 #include <boost/assign/v2/option/push_front.hpp>

Deleted: sandbox/assign_v2/libs/assign/v2/test/utility/chain.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/utility/chain.cpp 2011-03-24 12:27:18 EDT (Thu, 24 Mar 2011)
+++ (empty file)
@@ -1,87 +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 <iterator>
-#include <vector>
-#include <list>
-#include <boost/next_prior.hpp>
-#include <boost/range/begin.hpp>
-#include <boost/range/end.hpp>
-#include <boost/range/algorithm/copy.hpp>
-#include <boost/range/algorithm/equal.hpp>
-#include <boost/assign/v2/ref/array/csv_array.hpp>
-#include <boost/assign/v2/deque/csv_deque.hpp>
-#include <boost/assign/v2/utility/chain/check.hpp>
-#include <boost/assign/v2/utility/chain.hpp>
-#include <boost/assign/v2/utility/chain/operator_and.hpp>
-#include <libs/assign/v2/test/utility/chain.h>
-
-namespace test_assign_v2{
-namespace xxx_utility{
-namespace xxx_chain{
-
- // MSVC REMINDER : fully qualify boost::begin boost::end - error C2668
-
- void test()
- {
- using namespace boost;
- namespace as2 = assign::v2;
- {
- namespace ns = as2::check_chain_aux;
- { typedef int T; ns::static_<T>(); ns::static_<T>(); }
- { typedef double T; ns::static_<T>(); ns::static_<T>(); }
- }
- // Non-Boost.Assign.v2 containers
- {
- //[test_utility_chain_read
- typedef std::string T;
- array<T, 2> head; head[0] = "A"; head[1] = "B";
- std::list<T> tail; tail.push_back( "C" ); tail.push_back( "D" );
- std::vector<T> joined; copy( head | as2::_chain( tail ), std::back_inserter( joined ) );
-
- BOOST_ASSIGN_V2_CHECK(
- range::equal( joined, as2::csv_deque<T>("A", "B", "C", "D") )
- );
- //]
- }
- {
- //[test_utility_chain_write
- typedef std::string word; std::vector<word> words( 6 );
- words[0] = "foo"; words[1] = "bar"; words[2] = "baz";
- words[3] = "qux"; words[4] = "quux"; words[5] = "grault";
- array<word, 3> head; std::list<word> tail( 3 );
- copy( words,boost::begin( head | as2::_chain( tail ) ) );
-
- BOOST_ASSIGN_V2_CHECK( range::equal( head, as2::csv_deque<word>( "foo", "bar", "baz" ) ) );
- BOOST_ASSIGN_V2_CHECK( range::equal( tail, as2::csv_deque<word>( "qux", "quux", "grault" ) ) );
- //]
- }
- // Boost.Assign.v2 containers
- {
- //[test_utility_chain_write_refs
- /*<< Needed to bring && into scope >>*/ using namespace assign::v2;
- std::vector<int> consecutive8( 8 );
- for(int i = 0; i < 8; i++){ consecutive8[i] = 1 + i; }
- array<int, 5> consecutive5; int six, seven, eight;
- boost::copy(
- consecutive8,
- boost::begin( consecutive5 && (/*<< rvalue! >>*/ as2::ref::csv_array( six, seven, eight ) | as2::ref::_get ) )
- );
-
- BOOST_ASSIGN_V2_CHECK( range::equal( consecutive5, as2::csv_deque( 1, 2, 3, 4, 5 ) ) );
- BOOST_ASSIGN_V2_CHECK( six == 6 ); BOOST_ASSIGN_V2_CHECK( seven == 7 ); BOOST_ASSIGN_V2_CHECK( eight == 8 );
- //]
- }
-
-
- }// test
-
-}// xxx_chain
-}// xxx_utility
-}// test_assign_v2

Deleted: sandbox/assign_v2/libs/assign/v2/test/utility/chain.h
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/utility/chain.h 2011-03-24 12:27:18 EDT (Thu, 24 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 LIBS_ASSIGN_V2_TEST_UTILITY_CHAIN_ER_2010_H
-#define LIBS_ASSIGN_V2_TEST_UTILITY_CHAIN_ER_2010_H
-
-namespace test_assign_v2{
-namespace xxx_utility{
-namespace xxx_chain{
-
- void test();
-
-}// xxx_chain
-}// xxx_utility
-}// test_assign_v2
-
-#endif // LIBS_ASSIGN_V2_TEST_UTILITY_CHAIN_ER_2010_H

Deleted: sandbox/assign_v2/libs/assign/v2/test/utility/conversion.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/utility/conversion.cpp 2011-03-24 12:27:18 EDT (Thu, 24 Mar 2011)
+++ (empty file)
@@ -1,121 +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 <vector>
-#include <stack>
-#include <boost/array.hpp>
-#include <boost/assign/v2/detail/check/equal_container.hpp>
-#include <boost/assign/v2/detail/config/check.hpp>
-#include <boost/assign/v2/utility/conversion.hpp>
-#include <boost/assign/v2/utility/conversion/check.hpp>
-#include <boost/assign/v2/ref/array.hpp>
-#include <boost/assign/v2/deque.hpp>
-#include <boost/range/algorithm/equal.hpp>
-#include <libs/assign/v2/test/utility/conversion.h>
-
-namespace test_assign_v2{
-namespace xxx_utility{
-namespace xxx_conversion{
-
- // suggested by JB:
- //[test_utility_conversion_f
- template<typename C, typename R>
- void f(C cont, R const& r){
- namespace as2 = boost::assign::v2;
- as2::check_aux::equal_container( cont, r );
- }
- //]
-
- void test()
- {
- using namespace boost;
- namespace as2 = assign::v2;
- namespace ns = as2::check_aux;
-
- // External containers (fully qualified)
- {
- //[test_utility_conversion_vec_array
- std::vector<int> r( 3 ); r[0] = 72; r[1] = 31; r[2] = 48;
- typedef array<int, 3> ar_;
- ar_ const& ar = ( r | as2::_convert<ar_>() );
-
- BOOST_ASSIGN_V2_CHECK( range::equal( ar, as2::csv_deque( 72, 31, 48 ) ) );
- //]
- }
- {
- //[test_utility_conversion_vec_stack
- std::vector<int> r( 3 ); r[0] = 72; r[1] = 31; r[2] = 48;
- std::stack<int> lifo = as2::converter( r );
-
- BOOST_ASSIGN_V2_CHECK( lifo.top() == 48 );
- //]
- }
- {
- //[test_utility_conversion_stl
- typedef int T; typedef std::vector<T> R; R r( 3 ); r[0] = 72; r[1] = 31; r[2] = 48;
- f< std::vector<T> >( as2::converter( r ), r );
- f< std::deque<T> >( as2::converter( r ), r );
- f< std::list<T> >( as2::converter( r ), r );
- f< std::stack<T> >( as2::converter( r ), r );
- f< std::queue<T> >( as2::converter( r ), r );
- //]
- }
- {
- //[test_utility_conversion_matrix3x3
- const int sz = 3; typedef array<int, sz> row_;
- array<row_, sz> matrix3x3 = converter(
- as2::ref::array
- ( as2::ref::csv_array( 1, 2, 3 ) | as2::_convert<row_>() )
- ( as2::ref::csv_array( 4, 5, 6 ) | as2::_convert<row_>() )
- ( as2::ref::csv_array( 7, 8, 9 ) | as2::_convert<row_>() )
- );
-
- for(int i = 0; i < 9; i++)
- {
- BOOST_ASSIGN_V2_CHECK( matrix3x3[ i / 3 ][ i % 3 ] == i + 1 );
- }
- //]
- }
- // Boost.Assign.2.0 containers - name lookup
- {
- //[test_utility_conversion_as2_deque_array
- std::vector<int> r( 3 ); r[0] = 72; r[1] = 31; r[2] = 48;
- typedef array<int, 3> ar_;
- ar_ const& ar = ( as2::csv_deque( 72, 31, 48 ) | as2::_convert<ar_>() );
-
- BOOST_ASSIGN_V2_CHECK( range::equal( ar, as2::csv_deque( 72, 31, 48 ) ) );
- //]
- }
- {
- //[test_utility_conversion_ref_array_stack
- std::stack<int> lifo = /*<<Notice unqualified (name lookup)>>*/converter( as2::ref::array( 72 )( 31 )( 48 ) );
-
- BOOST_ASSIGN_V2_CHECK( lifo.top() == 48 );
- //]
- }
- {
- //[test_utility_conversion_ref_array_queue
- std::queue<int> fifo = /*<<Notice unqualified (name lookup)>>*/converter( as2::ref::csv_array( 72, 31, 48 ) );
-
- BOOST_ASSIGN_V2_CHECK( fifo.front() == 72 );
- //]
- }
- {
- //[test_utility_conversion_as2_deque_stack
- std::stack<int> lifo = /*<<Notice unqualified (name lookup)>>*/converter( as2::csv_deque( 72, 31, 48 ) );
-
- BOOST_ASSIGN_V2_CHECK( lifo.top() == 48 );
- //]
- }
- }
-
-}// xxx_conversion
-}// xxx_utility
-}// xxx_test_assign
-

Deleted: sandbox/assign_v2/libs/assign/v2/test/utility/csv.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/utility/csv.cpp 2011-03-24 12:27:18 EDT (Thu, 24 Mar 2011)
+++ (empty file)
@@ -1,57 +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 <deque>
-#include <boost/assign/v2/detail/config/check.hpp>
-#include <boost/assign/v2/utility/csv.hpp>
-#include <boost/assign/v2/deque.hpp>
-#include <boost/assign/v2/put.hpp>
-#include <boost/assign/v2/option/push_front.hpp>
-#include <boost/range/algorithm/equal.hpp>
-#include <libs/assign/v2/test/utility/csv.h>
-
-namespace test_assign_v2{
-namespace xxx_utility{
-namespace xxx_csv{
-
- void test(){
-
- using namespace boost;
- namespace as2 = assign::v2;
- {
- //[test_utility_csv_put
- std::deque<int> cont;
- as2::csv( as2::put( cont ), 72, 31, 48 );
-
- BOOST_ASSIGN_V2_CHECK( range::equal( cont, as2::csv_deque( 72, 31, 48 ) ) );
- //]
- }
- {
- //[test_utility_csv_put_modulo
- std::deque<int> cont;
- as2::csv( as2::put( cont ) % as2::_push_front, 72, 31, 48 );
-
- BOOST_ASSIGN_V2_CHECK( range::equal( cont, as2::csv_deque( 48, 31, 72 ) ) );
- //]
- }
- {
- //[test_utility_csv_deque_modulo
- BOOST_AUTO(
- cont,
- as2::csv( as2::deque<int>( as2::_nil ) % as2::_push_front, 72, 31, 48 )
- );
-
- BOOST_ASSIGN_V2_CHECK( range::equal( cont, as2::csv_deque( 48, 31, 72 ) ) );
- //]
- }
- }
-
-}// xxx_csv
-}// xxx_utility
-}// xxx_test_assign


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