Boost logo

Boost-Commit :

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


Author: e_r
Date: 2011-03-14 19:44:22 EDT (Mon, 14 Mar 2011)
New Revision: 69992
URL: http://svn.boost.org/trac/boost/changeset/69992

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/libs/assign/v2/test/mix.cpp | 66 ---------------------------------------
   sandbox/assign_v2/libs/assign/v2/test/unit_testing/put.cpp | 56 ++++++++++++++++++---------------
   sandbox/assign_v2/libs/assign/v2/test/unit_testing/ref.cpp | 12 +++---
   sandbox/assign_v2/libs/assign/v2/test/unit_testing/utility.cpp | 4 +
   sandbox/assign_v2/libs/assign/v2/test/utility/csv.cpp | 6 +-
   5 files changed, 44 insertions(+), 100 deletions(-)

Modified: sandbox/assign_v2/libs/assign/v2/test/mix.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/mix.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/mix.cpp 2011-03-14 19:44:22 EDT (Mon, 14 Mar 2011)
@@ -7,30 +7,15 @@
 // 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 <bitset>
-#include <cmath>
-#include <list>
-#include <vector>
-#include <boost/array.hpp>
+#include <deque>
 #include <boost/lambda/lambda.hpp>
-#include <boost/numeric/conversion/bounds.hpp>
-#include <boost/range/algorithm/copy.hpp>
 #include <boost/range/algorithm/equal.hpp>
 #include <boost/range/algorithm/stable_partition.hpp>
-#include <boost/typeof/typeof.hpp>
 #include <boost/assign/v2/detail/config/check.hpp>
-#include <boost/assign/v2/put/container.hpp>
-#include <boost/assign/v2/put/fun.hpp>
-#include <boost/assign/v2/put/modifier/repeat.hpp>
 #include <boost/assign/v2/put/pipe/csv_put.hpp>
-#include <boost/assign/v2/put/pipe/put.hpp>
-#include <boost/assign/v2/put/deque.hpp>
 #include <boost/assign/v2/ref/array.hpp>
-#include <boost/assign/v2/utility/chain/operator_and.hpp>
 #include <libs/assign/v2/test/mix.h>
 
-#include <iostream>
-
 namespace test_assign_v2{
 namespace xxx_mix{
 
@@ -58,55 +43,6 @@
             ));
             //]
         }
- {
- //[mix_bitset_revisited
- typedef std::string str_; typedef std::bitset<3> data_;
- std::vector<data_> consecutive; as2::put( consecutive )( as2::_as_arg_list( as2::csv_deque</*Explicit template argument `std::string` is required, because the deduced argument would be `const char*`, and only the former is a valid argument to `data_`'s constructor*/std::string>( "000", "001", "010", "011", "100", "101", "110", "111" ) ) );
-
- for(int i = 0; i < consecutive.size(); i++)
- {
- BOOST_ASSIGN_V2_CHECK( consecutive[i].to_ulong() == i );
- }
- //]
- }
- {
- //[mix_ragged
- typedef double data_; typedef std::list<data_> variable_size_; typedef std::vector<variable_size_> ragged_;
-
- ragged_ ragged = converter(
- as2::deque<variable_size_>
- ( as2::ref::csv_array( 0.71, 0.63, 0.85 ) | as2::_convert<variable_size_>() )
- ( as2::ref::csv_array( 0.61, 0.69, 0.92, 0.55 ) | as2::_convert<variable_size_>() )
- ( 1, -99.99 )
- ( )
- );
-
- BOOST_ASSIGN_V2_CHECK( ragged[0].size() == 3 );
- BOOST_ASSIGN_V2_CHECK( ragged[1].size() == 4 );
- BOOST_ASSIGN_V2_CHECK( ragged[2].size() == 1 );
- BOOST_ASSIGN_V2_CHECK( ragged[3].size() == 0 );
- //]
- data_ eps = numeric::bounds<data_>::smallest();
- BOOST_ASSIGN_V2_CHECK( fabs( ragged.front().front() - 0.71 ) < eps );
- BOOST_ASSIGN_V2_CHECK( fabs( ragged.front().back() - 0.85 ) < eps );
- BOOST_ASSIGN_V2_CHECK( fabs( ragged[2].front() + 99.99 ) < eps );
- BOOST_ASSIGN_V2_CHECK( fabs( ragged[2].back() + 99.99 ) < eps );
- }
- {
-
- //[mix_fun_iterate
- typedef int T; array<T, 5> powers; powers[0] = 1; powers[1] = 10;
- int i = 2, k = powers[ i - 1 ];
- /*<<Calls `powers[i] = ( k *= 10 )` for [^ i = 2, 3, 4 ] >>*/
- ( as2::put( powers ) % ( as2::_fun = var( k ) *= 10 ) % ( as2::_iterate = var( i )++ ) )()()();
-
- BOOST_ASSIGN_V2_CHECK( powers[0] == 1 );
- BOOST_ASSIGN_V2_CHECK( powers[1] == 10 );
- BOOST_ASSIGN_V2_CHECK( powers[2] == 100 );
- BOOST_ASSIGN_V2_CHECK( powers[3] == 1000 );
- BOOST_ASSIGN_V2_CHECK( powers[4] == 10000 );
- //]
- }
     }
 
 }// xxx_mix

Modified: sandbox/assign_v2/libs/assign/v2/test/unit_testing/put.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/unit_testing/put.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/unit_testing/put.cpp 2011-03-14 19:44:22 EDT (Mon, 14 Mar 2011)
@@ -15,18 +15,25 @@
 #include <boost/test/test_tools.hpp>
 #define BOOST_ASSIGN_V2_CHECK( p ) BOOST_CHECK( p )
 
-#include <libs/assign/v2/test/put/deduce.cpp>
+#include <libs/assign/v2/test/put/deque.cpp>
+#include <libs/assign/v2/test/put/fun.cpp>
+#include <libs/assign/v2/test/put/modifier/deduce.cpp>
+#include <libs/assign/v2/test/put/modifier/iterate.cpp>
+#include <libs/assign/v2/test/put/modifier/lookup.cpp>
+#include <libs/assign/v2/test/put/modifier/repeat.cpp>
+#include <libs/assign/v2/test/put/modifier/standard.cpp>
+#include <libs/assign/v2/test/put/pipe/args_list.cpp>
+#include <libs/assign/v2/test/put/pipe/fun.cpp>
+#include <libs/assign/v2/test/put/pipe/modifier/iterate.cpp>
+#include <libs/assign/v2/test/put/pipe/modifier/lookup.cpp>
+#include <libs/assign/v2/test/put/pipe/modifier/repeat.cpp>
+#include <libs/assign/v2/test/put/pipe/modifier/standard.cpp>
+#include <libs/assign/v2/test/put/pipe/put.cpp>
+#include <libs/assign/v2/test/put/put.cpp>
 
-#include <libs/assign/v2/test/put/container/functor.cpp>
-#include <libs/assign/v2/test/put/container/range.cpp>
-#include <libs/assign/v2/test/put/deque/functor.cpp>
 
+//#include <libs/assign/v2/test/put/ptr.cpp>
 
-#include <libs/assign/v2/test/put/ptr.cpp>
-
-#include <libs/assign/v2/test/put/pipe/functor/rhs.cpp>
-#include <libs/assign/v2/test/put/pipe/functor/str_literal.cpp>
-#include <libs/assign/v2/test/put/pipe/range.cpp>
 
 #include <boost/test/unit_test.hpp>
 using boost::unit_test::test_suite;
@@ -37,22 +44,21 @@
     {
 
             namespace ns = xxx_put;
- test->add( BOOST_TEST_CASE( &ns::xxx_deduce::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_container::xxx_functor::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_container::xxx_range::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_deque::xxx_functor::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_modulo::xxx_fun::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_modulo::xxx_std::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_modulo::xxx_ext::test ) );
-
- test->add( BOOST_TEST_CASE( &ns::xxx_pipe::xxx_functor::xxx_forward::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_pipe::xxx_functor::xxx_rhs::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_pipe::xxx_functor::xxx_str_literal::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_pipe::xxx_container::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_pipe::xxx_modulo::xxx_fun::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_pipe::xxx_modulo::xxx_std::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_pipe::xxx_range::test ) );
-
+ test->add( BOOST_TEST_CASE( &ns::xxx_deque::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_fun::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_modifier::xxx_deduce::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_modifier::xxx_iterate::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_modifier::xxx_lookup::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_modifier::xxx_repeat::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_modifier::xxx_standard::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_pipe::xxx_args_list::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_pipe::xxx_fun::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_pipe::xxx_modifier::xxx_iterate::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_pipe::xxx_modifier::xxx_lookup::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_pipe::xxx_modifier::xxx_repeat::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_pipe::xxx_modifier::xxx_standard::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_pipe::xxx_put::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_put::test ) );
     }
     return test;
 }

Modified: sandbox/assign_v2/libs/assign/v2/test/unit_testing/ref.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/unit_testing/ref.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/unit_testing/ref.cpp 2011-03-14 19:44:22 EDT (Mon, 14 Mar 2011)
@@ -14,12 +14,12 @@
 
 #include <boost/test/test_tools.hpp>
 #define BOOST_ASSIGN_V2_CHECK( p ) BOOST_CHECK( p )
+#include <libs/assign/v2/test/ref/array.cpp>
 #include <libs/assign/v2/test/ref/convert_traits.cpp>
-#include <libs/assign/v2/test/ref/wrapper.cpp>
+#include <libs/assign/v2/test/ref/csv_array.cpp>
 #include <libs/assign/v2/test/ref/list.cpp>
 #include <libs/assign/v2/test/ref/list_tuple.cpp>
-#include <libs/assign/v2/test/ref/array/functor.cpp>
-#include <libs/assign/v2/test/ref/array/csv.cpp>
+#include <libs/assign/v2/test/ref/wrapper.cpp>
 
 #include <boost/test/unit_test.hpp>
 using boost::unit_test::test_suite;
@@ -29,12 +29,12 @@
     using namespace test_assign_v2;
     {
             using namespace xxx_ref;
+ test->add( BOOST_TEST_CASE( &xxx_array::test ) );
                 test->add( BOOST_TEST_CASE( &xxx_convert_traits::test ) );
- test->add( BOOST_TEST_CASE( &xxx_wrapper::test ) );
+ test->add( BOOST_TEST_CASE( &xxx_csv_array::test ) );
                 test->add( BOOST_TEST_CASE( &xxx_list::test ) );
                 test->add( BOOST_TEST_CASE( &xxx_list_tuple::test ) );
- test->add( BOOST_TEST_CASE( &xxx_array::xxx_functor::test ) );
- test->add( BOOST_TEST_CASE( &xxx_array::xxx_csv::test ) );
+ test->add( BOOST_TEST_CASE( &xxx_wrapper::test ) );
     }
     return test;
 }

Modified: sandbox/assign_v2/libs/assign/v2/test/unit_testing/utility.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/unit_testing/utility.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/unit_testing/utility.cpp 2011-03-14 19:44:22 EDT (Mon, 14 Mar 2011)
@@ -16,6 +16,7 @@
 #define BOOST_ASSIGN_V2_CHECK( p ) BOOST_CHECK( p )
 #include <libs/assign/v2/test/utility/chain.cpp>
 #include <libs/assign/v2/test/utility/conversion.cpp>
+#include <libs/assign/v2/test/utility/csv.cpp>
 #include <boost/test/unit_test.hpp>
 using boost::unit_test::test_suite;
 test_suite* init_unit_test_suite( int argc, char* argv[] )
@@ -25,7 +26,8 @@
     {
             using namespace xxx_utility;
             test->add( BOOST_TEST_CASE( &xxx_chain::test ) );
- test->add( BOOST_TEST_CASE( &xxx_convert::test ) );
+ test->add( BOOST_TEST_CASE( &xxx_conversion::test ) );
+ test->add( BOOST_TEST_CASE( &xxx_csv::test ) );
         }
     return test;
 }

Modified: 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/utility/csv.cpp 2011-03-14 19:44:22 EDT (Mon, 14 Mar 2011)
@@ -24,7 +24,7 @@
         using namespace boost;
         namespace as2 = assign::v2;
         {
- //[csv_put
+ //[test_utility_csv_put
             std::deque<int> cont;
             as2::csv( as2::put( cont ), 72, 31, 48 );
 
@@ -33,7 +33,7 @@
             //]
         }
         {
- //[csv_put_modulo
+ //[test_utility_csv_put_modulo
             std::deque<int> cont;
             as2::csv( as2::put( cont ) % as2::_push_front, 72, 31, 48 );
 
@@ -42,7 +42,7 @@
             //]
         }
         {
- //[csv_deque_modulo
+ //[test_utility_csv_modulo_deque
             BOOST_AUTO(
                 cont,
                 as2::csv( as2::deque<int>( as2::_nil ) % as2::_push_front, 72, 31, 48 )


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