Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70241 - in sandbox/assign_v2/libs/assign/v2/test/value/pipe: . modifier
From: erwann.rogard_at_[hidden]
Date: 2011-03-20 20:19:47


Author: e_r
Date: 2011-03-20 20:19:44 EDT (Sun, 20 Mar 2011)
New Revision: 70241
URL: http://svn.boost.org/trac/boost/changeset/70241

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/libs/assign/v2/test/value/pipe/fun.cpp | 8 ++++----
   sandbox/assign_v2/libs/assign/v2/test/value/pipe/modifier/repeat.cpp | 4 ++--
   sandbox/assign_v2/libs/assign/v2/test/value/pipe/modifier/standard.cpp | 9 ++++-----
   sandbox/assign_v2/libs/assign/v2/test/value/pipe/put.cpp | 19 -------------------
   4 files changed, 10 insertions(+), 30 deletions(-)

Modified: sandbox/assign_v2/libs/assign/v2/test/value/pipe/fun.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/value/pipe/fun.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/value/pipe/fun.cpp 2011-03-20 20:19:44 EDT (Sun, 20 Mar 2011)
@@ -14,7 +14,7 @@
 
 #include <boost/assign/v2/value/deque/csv_deque.hpp>
 #include <boost/assign/v2/value/fun.hpp>
-#include <boost/assign/v2/value/pipe/put.hpp>
+#include <boost/assign/v2/value/pipe/csv_put.hpp>
 #include <boost/lambda/lambda.hpp>
 #include <boost/range/algorithm/equal.hpp>
 #include <libs/assign/v2/test/value/pipe/fun.h>
@@ -35,14 +35,14 @@
         namespace as2 = assign::v2;
         {
             //[csv_pipe_modulo_fun_math
- int i = 0, k = 1; std::list<int> factorials;
+ int k = 1; std::list<int> factorials;
                 using namespace lambda;
             
             BOOST_ASSIGN_V2_CHECK(
                 range::equal(
                     factorials | (
- as2::_put % ( as2::_fun = ( var(k) *= ( ++var(i) ) ) )
- )/*Equivalent to calling `factorials.push_back( k *= ++i )`*/()()()()(),
+ as2::_csv_put % ( as2::_fun = ( var(k) *= _1 ) )
+ )/*Equivalent to calling `factorials.push_back( k *= ++i )`*/( 1, 2, 3, 4, 5 ),
                     as2::csv_deque<int>( 1 )( 2 )( 6 )( 24 )( 120 )
                 )
             );

Modified: sandbox/assign_v2/libs/assign/v2/test/value/pipe/modifier/repeat.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/value/pipe/modifier/repeat.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/value/pipe/modifier/repeat.cpp 2011-03-20 20:19:44 EDT (Sun, 20 Mar 2011)
@@ -10,7 +10,7 @@
 #include <vector>
 #include <boost/assign/v2/detail/config/check.hpp>
 #include <boost/assign/v2/value/modifier/repeat.hpp>
-#include <boost/assign/v2/value/pipe/put.hpp>
+#include <boost/assign/v2/value/pipe/csv_put.hpp>
 #include <boost/assign/v2/value/deque.hpp>
 #include <boost/range/algorithm/equal.hpp>
 #include <libs/assign/v2/test/value/pipe/modifier/repeat.h>
@@ -31,7 +31,7 @@
             std::vector<int> cont;
             BOOST_ASSIGN_V2_CHECK(
                 range::equal(
- cont | ( as2::_put % ( as2::_repeat = 2 ) )( 72 )( 31 )( 48 ),
+ cont | ( as2::_csv_put % ( as2::_repeat = 2 ) )( 72, 31, 48 ),
                     as2::csv_deque<int>( 72, 72, 31, 31, 48, 48 )
                 )
             );

Modified: sandbox/assign_v2/libs/assign/v2/test/value/pipe/modifier/standard.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/value/pipe/modifier/standard.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/value/pipe/modifier/standard.cpp 2011-03-20 20:19:44 EDT (Sun, 20 Mar 2011)
@@ -18,7 +18,6 @@
 #include <boost/assign/v2/detail/config/check.hpp>
 #include <boost/assign/v2/value/modifier/standard.hpp>
 #include <boost/assign/v2/value/pipe/csv_put.hpp>
-#include <boost/assign/v2/value/pipe/put.hpp>
 #include <boost/assign/v2/value/deque.hpp>
 #include <libs/assign/v2/test/value/pipe/modifier/standard.h>
 
@@ -54,7 +53,7 @@
         {
             //[test_value_pipe_modifier_push
             typedef int int_; std::queue<int_> fifo; int_ front = (
- fifo | ( as2::_put % as2::_push )( 72 )( 31 )( 48 )
+ fifo | ( as2::_csv_put % as2::_push )( 72, 31, 48 )
             ).front();
                 
             BOOST_ASSIGN_V2_CHECK( front == 72 );
@@ -65,11 +64,11 @@
             //[test_value_pipe_modifier_insert
             typedef std::set<double> doubles_; doubles_ sqrt2;
             range_iterator<doubles_>::type lower = (
- sqrt2 | ( as2::_put % as2::_insert )( 1.414 )( 1.41421 )( 1.41 )( 1.4142 )
+ sqrt2 | ( as2::_csv_put % as2::_insert )( 1.414, 1.41421, 1.41, 1.4142 )
             ).lower_bound( 1.41 );
         
- BOOST_ASSIGN_V2_CHECK( lower ==boost::begin( sqrt2 ) );
- BOOST_ASSIGN_V2_CHECK( sqrt2.upper_bound( 1.41421 ) ==boost::end( sqrt2 ) );
+ BOOST_ASSIGN_V2_CHECK( lower == boost::begin( sqrt2 ) );
+ BOOST_ASSIGN_V2_CHECK( sqrt2.upper_bound( 1.41421 ) == boost::end( sqrt2 ) );
             //]
         }
     }

Modified: sandbox/assign_v2/libs/assign/v2/test/value/pipe/put.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/value/pipe/put.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/value/pipe/put.cpp 2011-03-20 20:19:44 EDT (Sun, 20 Mar 2011)
@@ -41,25 +41,6 @@
             );
             //]
         }
-// TODO
-/*
- {
- //[test_value_pipe_put_intervals
- boost::array<int, 2> interval; boost::array<int, 6> all6;
-
- BOOST_ASSIGN_V2_CHECK(
- boost::range::equal(
- all6 | as2::_put( 1 )( 2 )( as2::as_arg_list( interval | as2::_csv_put( 3, 4 ) ) )( 5 )( 6 ),
- as2::csv_deque( 1, 2, 3, 4, 5, 6 )
- )
- );
-
- BOOST_ASSIGN_V2_CHECK(
- boost::range::equal( interval, as2::csv_deque( 3, 4 ) )
- );
- //]
- }
-*/
     }// test()
 
 }// xxx_put


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