|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r69042 - sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor
From: erwann.rogard_at_[hidden]
Date: 2011-02-19 05:58:10
Author: e_r
Date: 2011-02-19 05:58:08 EST (Sat, 19 Feb 2011)
New Revision: 69042
URL: http://svn.boost.org/trac/boost/changeset/69042
Log:
upd assign_v2
Added:
sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/fun.cpp (contents, props changed)
sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/fun.h (contents, props changed)
sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/std.cpp (contents, props changed)
sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/std.h (contents, props changed)
sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/str_literal.cpp (contents, props changed)
sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/str_literal.h (contents, props changed)
Added: sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/fun.cpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/fun.cpp 2011-02-19 05:58:08 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,44 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/put/modulo/fun.hpp>
+#include <boost/assign/v2/put/pipe/functor.hpp>
+#include <boost/lambda/lambda.hpp>
+#include <libs/assign/v2/test/put/pipe/functor/fun.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_functor{
+namespace xxx_fun{
+
+ void test()
+ {
+ namespace as2 = boost::assign::v2;
+ namespace bl = boost::lambda;
+ {
+ //[fun
+ typedef int T; T x = 1, y = 2, z = 0;
+ std::vector<int> cont;
+ cont | (
+ as2::_put % ( as2::_fun = ( bl::_1 + 1 ) )
+ )( x )( y )( z );
+ BOOST_ASSIGN_V2_CHECK( cont.front() == ( x + 1 ) );
+ BOOST_ASSIGN_V2_CHECK( cont.back() == ( z + 1 ) );
+ //]
+ }
+ }
+
+}// xxx_fun
+}// xxx_functor
+}// xxx_pipe
+}// xxx_put
+}// test_assign_v2
Added: sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/fun.h
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/fun.h 2011-02-19 05:58:08 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,27 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_PIPE_FUNCTOR_FUN_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_PIPE_FUNCTOR_FUN_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_functor{
+namespace xxx_fun{
+
+ void test();
+
+}// xxx_fun
+}// xxx_functor
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign
+
+#endif
Added: sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/std.cpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/std.cpp 2011-02-19 05:58:08 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,42 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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/put/std/push_front.hpp>
+#include <boost/assign/v2/put/pipe/functor.hpp>
+#include <boost/lambda/lambda.hpp>
+#include <libs/assign/v2/test/put/pipe/functor/std.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_functor{
+namespace xxx_std{
+
+ void test()
+ {
+ namespace as2 = boost::assign::v2;
+ namespace bl = boost::lambda;
+ {
+ //[push_front
+ typedef int T; T x = 1, y = 2, z = 0;
+ std::deque<int> cont;
+ cont | ( as2::_put % as2::_push_front )( x )( y )( z );
+ BOOST_ASSIGN_V2_CHECK( cont.front() == z );
+ BOOST_ASSIGN_V2_CHECK( cont.back() == x );
+ //]
+ }
+ }
+
+}// xxx_std
+}// xxx_functor
+}// xxx_pipe
+}// xxx_put
+}// test_assign_v2
Added: sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/std.h
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/std.h 2011-02-19 05:58:08 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,27 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_PIPE_FUNCTOR_STD_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_PIPE_FUNCTOR_STD_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_functor{
+namespace xxx_std{
+
+ void test();
+
+}// xxx_std
+}// xxx_functor
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign
+
+#endif
Added: sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/str_literal.cpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/str_literal.cpp 2011-02-19 05:58:08 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,38 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <string>
+
+#include <boost/assign/v2/put/pipe/functor.hpp>
+#include <boost/assign/v2/detail/config/check.hpp>
+#include <libs/assign/v2/test/put/pipe/functor/str_literal.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_functor{
+namespace xxx_str_literal{
+
+ void test()
+ {
+ namespace as2 = boost::assign::v2;
+ typedef const char* T;
+ std::deque<T> cont; typedef std::string str_;
+ cont | as2::_put( "x" )( "y" )( "z" );
+ BOOST_ASSIGN_V2_CHECK( str_( cont[0] ) == "x" );
+ BOOST_ASSIGN_V2_CHECK( str_( cont[1] ) == "y" );
+ BOOST_ASSIGN_V2_CHECK( str_( cont[2] ) == "z" );
+ }
+
+}// xxx_str_literal
+}// xxx_functor
+}// xxx_pipe
+}// xxx_put
+}// test_assign_v2
Added: sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/str_literal.h
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/str_literal.h 2011-02-19 05:58:08 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,27 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_PIPE_FUNCTOR_STR_LITERAL_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_PIPE_FUNCTOR_STD_LITERAL_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_functor{
+namespace xxx_str_literal{
+
+ void test();
+
+}// xxx_str_literal
+}// xxx_functor
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign
+
+#endif
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