Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70488 - in sandbox/assign_v2/libs/assign/v2/test: ref unit_testing
From: erwann.rogard_at_[hidden]
Date: 2011-03-23 22:11:15


Author: e_r
Date: 2011-03-23 22:11:13 EDT (Wed, 23 Mar 2011)
New Revision: 70488
URL: http://svn.boost.org/trac/boost/changeset/70488

Log:
upd assign_v2
Added:
   sandbox/assign_v2/libs/assign/v2/test/ref/get.cpp (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/ref/get.h (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/unit_testing/pipe.cpp (contents, props changed)

Added: sandbox/assign_v2/libs/assign/v2/test/ref/get.cpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/ref/get.cpp 2011-03-23 22:11:13 EDT (Wed, 23 Mar 2011)
@@ -0,0 +1,47 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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/array.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/assign/v2/ref/array/get.hpp>
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+#include <boost/assign/v2/deque/csv_deque.hpp>
+#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <libs/assign/v2/test/ref/wrapper.h>
+
+namespace test_assign_v2{
+namespace xxx_ref{
+namespace xxx_get{
+
+ void test()
+ {
+ //[test_ref_get
+ namespace as2 = boost::assign::v2;
+ typedef int T; typedef as2::ref::copy_wrapper<T>::type w_;
+ boost::array<w_, 3> ref_array; int x, y, z;
+
+ boost::copy(
+ as2::csv_deque( w_( x ), w_( y ), w_( z ) ),
+ boost::begin( ref_array )
+ );
+ boost::copy(
+ as2::csv_deque( 314, 3141, 31415 ),
+ boost::begin( ref_array | as2::ref::_get )
+ );
+
+ BOOST_ASSIGN_V2_CHECK( x == 314 );
+ BOOST_ASSIGN_V2_CHECK( y == 3141 );
+ BOOST_ASSIGN_V2_CHECK( z == 31415 );
+ //]
+ }
+
+}// xxx_get
+}// xxx_ref
+}// test_assign_v2
\ No newline at end of file

Added: sandbox/assign_v2/libs/assign/v2/test/ref/get.h
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/ref/get.h 2011-03-23 22:11:13 EDT (Wed, 23 Mar 2011)
@@ -0,0 +1,24 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_GET_ER_2010_H
+#define BOOST_ASSIGN_V2_TEST_REF_GET_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_ref{
+namespace xxx_get{
+
+ void test();
+
+}// xxx_ge
+}// xxx_ref
+}// test_assign
+
+#endif // BOOST_ASSIGN_V2_TEST_REF_GET_ER_2010_H
+

Added: sandbox/assign_v2/libs/assign/v2/test/unit_testing/pipe.cpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/unit_testing/pipe.cpp 2011-03-23 22:11:13 EDT (Wed, 23 Mar 2011)
@@ -0,0 +1,41 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_UNIT_TEST_PIPE_ER_2010_CPP
+#define LIBS_ASSIGN_V2_TEST_UNIT_TEST_PIPE_ER_2010_CPP
+
+#include <boost/test/test_tools.hpp>
+#define BOOST_ASSIGN_V2_CHECK( p ) BOOST_CHECK( p )
+
+#include <libs/assign/v2/test/pipe/csv_put.cpp>
+#include <libs/assign/v2/test/pipe/option/data.cpp>
+#include <libs/assign/v2/test/pipe/option/iterate.cpp>
+#include <libs/assign/v2/test/pipe/option/mapped.cpp>
+#include <libs/assign/v2/test/pipe/option/repeat.cpp>
+#include <libs/assign/v2/test/pipe/option/std_modifier.cpp>
+
+#include <boost/test/unit_test.hpp>
+using boost::unit_test::test_suite;
+test_suite* init_unit_test_suite( int argc, char* argv[] )
+{
+ test_suite* test = BOOST_TEST_SUITE( "BOOST_ASSIGN_V2" );
+ using namespace test_assign_v2;
+ {
+ namespace ns = xxx_pipe;
+ test->add( BOOST_TEST_CASE( &ns::xxx_csv_put::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_option::xxx_data::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_option::xxx_iterate::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_option::xxx_mapped::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_option::xxx_repeat::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_option::xxx_std_modifier::test ) );
+ }
+ return test;
+}
+
+#endif // LIBS_ASSIGN_V2_TEST_UNIT_TEST_PIPE_ER_2010_CPP


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