Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72533 - in sandbox/assign_v2/libs/assign/v2/test: deque put
From: erwann.rogard_at_[hidden]
Date: 2011-06-10 09:07:26


Author: e_r
Date: 2011-06-10 09:07:25 EDT (Fri, 10 Jun 2011)
New Revision: 72533
URL: http://svn.boost.org/trac/boost/changeset/72533

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/libs/assign/v2/test/deque/csv_deque_ext.cpp | 15 ++++++++++++---
   sandbox/assign_v2/libs/assign/v2/test/put/csv_put_ext.cpp | 36 ++++++++++--------------------------
   sandbox/assign_v2/libs/assign/v2/test/put/do_put.cpp | 31 +++++++++++++------------------
   3 files changed, 35 insertions(+), 47 deletions(-)

Modified: sandbox/assign_v2/libs/assign/v2/test/deque/csv_deque_ext.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/deque/csv_deque_ext.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/deque/csv_deque_ext.cpp 2011-06-10 09:07:25 EDT (Fri, 10 Jun 2011)
@@ -12,6 +12,7 @@
 #include <boost/assign/v2/support/config/check.hpp>
 
 #include <boost/assign/v2/support/config/enable_cpp0x.hpp>
+#include <boost/config.hpp>
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
 #include <tuple>
 #else
@@ -42,8 +43,16 @@
             typedef std::string state_;
             typedef int code_;
             state_ ct = "CT", nj = "NJ", ny = "NY";
-
+//<-
+// TODO elucidate the runtime failed assertation
+#if BOOST_MSVC
+ typedef tuple<state_, code_> data_;
+#else
+//->
             typedef tuple<state_/*<<Notice the reference>>*/&, code_> data_;
+//<-
+#endif
+//->
 
             as2::result_of::deque<
                 data_
@@ -54,9 +63,9 @@
             );
 
             BOOST_ASSIGN_V2_CHECK( get<0>( region.front() ) == ny );
- BOOST_ASSIGN_V2_CHECK( get<1>( region.back() ) == 203 );
- BOOST_ASSIGN_V2_CHECK( get<1>( region.front() ) == 212 );
             BOOST_ASSIGN_V2_CHECK( get<0>( region.back() ) == ct );
+ BOOST_ASSIGN_V2_CHECK( get<1>( region.front() ) == 212 );
+ BOOST_ASSIGN_V2_CHECK( get<1>( region.back() ) == 203 );
             //]
         }
 

Modified: sandbox/assign_v2/libs/assign/v2/test/put/csv_put_ext.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/csv_put_ext.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/csv_put_ext.cpp 2011-06-10 09:07:25 EDT (Fri, 10 Jun 2011)
@@ -63,20 +63,16 @@
         {
             // Not Assignable (Container requirement) but GCC takes it:
             //typedef const char state_ [3];
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+ using namespace std;
+#else
+ using namespace boost;
+#endif
             //[test_csv_put_ext2
             typedef int code_;
             typedef std::string state_;
             state_ ct = "CT", nj = "NJ", ny = "NY";
-
-//<-
-#if BOOST_ASSIGN_V2_ENABLE_CPP0X
-//->
- typedef std::tuple<state_/*<<Notice the reference>>*/&, code_> data_;
-//<-
-#else
- typedef boost::tuple<state_&, code_> data_;
-#endif
-//->
+ typedef tuple<state_/*<<Notice the reference>>*/&, code_> data_;
             std::deque< data_ > region;
 
             as2::csv_put<2>(
@@ -86,23 +82,11 @@
                 ct, 203
             );
 
-//<-
-#if BOOST_ASSIGN_V2_ENABLE_CPP0X
-//->
- BOOST_ASSIGN_V2_CHECK( std::get<0>( region.front() ) == ny );
- BOOST_ASSIGN_V2_CHECK( std::get<1>( region.back() ) == 203 );
- BOOST_ASSIGN_V2_CHECK( std::get<1>( region.front() ) == 212 );
- BOOST_ASSIGN_V2_CHECK( std::get<0>( region.back() ) == ct );
-//<-
-#endif
-//->
+ BOOST_ASSIGN_V2_CHECK( get<0>( region.front() ) == ny );
+ BOOST_ASSIGN_V2_CHECK( get<1>( region.back() ) == 203 );
+ BOOST_ASSIGN_V2_CHECK( get<1>( region.front() ) == 212 );
+ BOOST_ASSIGN_V2_CHECK( get<0>( region.back() ) == ct );
             //]
-#if! BOOST_ASSIGN_V2_ENABLE_CPP0X
- BOOST_ASSIGN_V2_CHECK( boost::get<0>( region.front() ) == ny );
- BOOST_ASSIGN_V2_CHECK( boost::get<1>( region.back() ) == 203 );
- BOOST_ASSIGN_V2_CHECK( boost::get<1>( region.front() ) == 212 );
- BOOST_ASSIGN_V2_CHECK( boost::get<0>( region.back() ) == ct );
-#endif
         }
         // MAP
         {

Modified: sandbox/assign_v2/libs/assign/v2/test/put/do_put.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/do_put.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/do_put.cpp 2011-06-10 09:07:25 EDT (Fri, 10 Jun 2011)
@@ -54,18 +54,15 @@
             //]
         }
         {
- //[test_do_put2
- typedef std::string month_; typedef int days_;
- typedef std::pair<month_, days_> p_;
-//<-
 #if BOOST_ASSIGN_V2_ENALBE_CPP0X
-//->
- typedef std::tuple<month_, days_> t_;
-//<-
+ using namespace std;
 #else
- typedef boost::tuple<month_, days_> t_;
+ using namespace boost;
 #endif
-//->
+ //[test_do_put2
+ typedef std::string month_; typedef int days_;
+ typedef std::pair<month_, days_> p_;
+ typedef tuple<month_, days_> t_;
             std::deque<p_> q1;
 
             BOOST_ASSIGN_V2_CHECK(
@@ -83,6 +80,11 @@
             //]
         }
         {
+#if BOOST_ASSIGN_V2_ENALBE_CPP0X
+ using namespace std;
+#else
+ using namespace boost;
+#endif
             //[test_do_put3
             typedef std::string month_;
             typedef int days_;
@@ -91,15 +93,8 @@
             benchmark[ "jan" ] = 31;
             benchmark[ "feb" ] = 28;
             benchmark[ "mar" ] = 31;
-//<-
-#if BOOST_ASSIGN_V2_ENABLE_CPP0X
-//->
- typedef std::tuple<const char (&)[4], int> t_;
-//<-
-#else
- typedef boost::tuple<const char (&)[4], int> t_;
-#endif
-//->
+ typedef tuple<std::string, int> t_;
+
             BOOST_ASSIGN_V2_CHECK(
                 boost::range::equal(
                     q1 | as2::_do_put.for_each<2>(


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