Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70334 - in sandbox/assign_v2/libs/assign/v2/test: . modifier unit_testing
From: erwann.rogard_at_[hidden]
Date: 2011-03-21 14:04:08


Author: e_r
Date: 2011-03-21 14:04:06 EDT (Mon, 21 Mar 2011)
New Revision: 70334
URL: http://svn.boost.org/trac/boost/changeset/70334

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/libs/assign/v2/test/fun.cpp | 60 ++------------------------------
   sandbox/assign_v2/libs/assign/v2/test/fun.h | 10 ++--
   sandbox/assign_v2/libs/assign/v2/test/modifier.cpp | 31 ++++++++++++++++
   sandbox/assign_v2/libs/assign/v2/test/modifier.h | 22 +++++++++++
   sandbox/assign_v2/libs/assign/v2/test/modifier/deduce.cpp | 73 +++++++++++++++++++++++++++++++++++++++
   sandbox/assign_v2/libs/assign/v2/test/modifier/deduce.h | 24 ++++++++++++
   sandbox/assign_v2/libs/assign/v2/test/unit_testing/Jamfile.v2 | 6 +-
   7 files changed, 159 insertions(+), 67 deletions(-)

Modified: sandbox/assign_v2/libs/assign/v2/test/fun.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/fun.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/fun.cpp 2011-03-21 14:04:06 EDT (Mon, 21 Mar 2011)
@@ -7,66 +7,16 @@
 // 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 <cmath> // MSVC #include <math.h>
-#include <deque>
-#include <list>
-#include <vector>
-#include <boost/array.hpp>
-#include <boost/assign/v2/detail/config/check.hpp>
-
-#include <boost/assign/v2/put/put.hpp>
-#include <boost/assign/v2/deque.hpp>
-#include <boost/assign/v2/fun.hpp>
-#include <boost/function.hpp>
-#include <boost/lambda/bind.hpp>
-#include <boost/lambda/lambda.hpp>
-#include <boost/lambda/construct.hpp>
-#include <boost/numeric/conversion/bounds.hpp>
-#include <boost/range/algorithm/equal.hpp>
-#include <boost/typeof/typeof.hpp>
-#include <libs/assign/v2/test/fun.h>
-
-#include <boost/lexical_cast.hpp>
+#include <libs/assign/v2/test/framwork/modifier.h>
+#include <libs/assign/v2/test/framwork.h>
 
 namespace test_assign_v2{
-namespace xxx_fun{
+namespace xxx_framework{
 
     void test()
     {
- using namespace boost;
- namespace as2 = assign::v2;
- {
- // (*fp) resolves error C2440 using MSVC
- //[test_fun_math
- std::vector<double> exponent;
- typedef double(*fp)(double);
- typedef function<double(double)> f_;
- (
- as2::put( exponent ) % ( as2::_fun = f_( fp(log10) ) )
- )/*<<Equivalent to `as2::put( exponent )( log10( 1000.0 ) )( log10( 10.0 ) )( log10( 10000.0 ) )( log10( 1.0 ) )( log10( 100.0 ) )`>>*/( 1000.0 )( 10.0 )( 10000.0 )( 1.0 )( 100.0 );
-
- double eps = numeric::bounds<double>::smallest();
- BOOST_ASSIGN_V2_CHECK( fabs( exponent.front() - 3.0 ) < eps );
- BOOST_ASSIGN_V2_CHECK( fabs( exponent.back() - 2.0 ) < eps );
- //]
- }
- {
- //[test_fun_recursive
- using namespace lambda;
- int i = 1, k = 1;
- BOOST_AUTO(
- factorials, (
- as2::deque<int>( as2::_nil ) % (
- as2::_fun = ( var(k) *= ( var(i)++ ) )
- )
- )/*<<Equivalent to `factorials( k *= i++ )` for [^i = 1, ..., 5]>>*/()()()()()
- );
-
- BOOST_ASSIGN_V2_CHECK( range::equal( factorials, as2::csv_deque( 1, 2, 6, 24, 120 ) ) );
- //]
- }
-
+ xxx_modifier::test();
     }
 
-}// xxx_fun
+}// xxx_framework
 }// test_assign_v2

Modified: sandbox/assign_v2/libs/assign/v2/test/fun.h
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/fun.h (original)
+++ sandbox/assign_v2/libs/assign/v2/test/fun.h 2011-03-21 14:04:06 EDT (Mon, 21 Mar 2011)
@@ -7,15 +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) //
 //////////////////////////////////////////////////////////////////////////////
-#ifndef LIBS_ASSIGN_V2_TEST_FUN_ER_2010_H
-#define LIBS_ASSIGN_V2_TEST_FUN_ER_2010_H
+#ifndef LIBS_ASSIGN_V2_TEST_FRAMEWORK_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_FRAMEWORK_ER_2010_H
 
 namespace test_assign_v2{
-namespace xxx_fun{
+namespace xxx_framework{
 
     void test();
 
-}// xxx_fun
+}// xxx_framework
 }// xxx_test_assign
 
-#endif // LIBS_ASSIGN_V2_TEST_FUN_ER_2010_H
+#endif // LIBS_ASSIGN_V2_TEST_FRAMEWORK_ER_2010_H

Modified: sandbox/assign_v2/libs/assign/v2/test/modifier.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/modifier.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/modifier.cpp 2011-03-21 14:04:06 EDT (Mon, 21 Mar 2011)
@@ -1 +1,30 @@
-// TODO remove file
\ No newline at end of file
+//////////////////////////////////////////////////////////////////////////////
+// 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 <libs/assign/v2/test/optional/fun.h>
+#include <libs/assign/v2/test/optional/iterate.h>
+#include <libs/assign/v2/test/optional/lookup.h>
+#include <libs/assign/v2/test/optional/repeat.h>
+#include <libs/assign/v2/test/optional/standard.h>
+#include <libs/assign/v2/test/optional.h>
+
+namespace test_assign_v2{
+namespace xxx_optional{
+
+ void test(){
+ xxx_deduce::test();
+ xxx_iterate::test();
+ xxx_lookup::test();
+ xxx_repeat::test();
+ xxx_standard::test();
+ }
+
+}// xxx_optional
+}// xxx_test_assign
+

Modified: sandbox/assign_v2/libs/assign/v2/test/modifier.h
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/modifier.h (original)
+++ sandbox/assign_v2/libs/assign/v2/test/modifier.h 2011-03-21 14:04:06 EDT (Mon, 21 Mar 2011)
@@ -1 +1,21 @@
-// TODO remove file
\ No newline at end of file
+//////////////////////////////////////////////////////////////////////////////
+// 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_OPTIONAL_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_OPTIONAL_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_optional{
+
+ void test();
+
+}// xxx_optional
+}// xxx_test_assign
+
+#endif // LIBS_ASSIGN_V2_TEST_OPTIONAL_ER_2010_H

Modified: sandbox/assign_v2/libs/assign/v2/test/modifier/deduce.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/modifier/deduce.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/modifier/deduce.cpp 2011-03-21 14:04:06 EDT (Mon, 21 Mar 2011)
@@ -1 +1,72 @@
-// TODO remove file
+//////////////////////////////////////////////////////////////////////////////
+// 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 <cmath> // MSVC #include <math.h>
+#include <deque>
+#include <list>
+#include <vector>
+#include <boost/array.hpp>
+#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/deque.hpp>
+#include <boost/assign/v2/put/put.hpp>
+// Options come next
+#include <boost/assign/v2/fun.hpp>
+#include <boost/function.hpp>
+#include <boost/lambda/bind.hpp>
+#include <boost/lambda/lambda.hpp>
+#include <boost/lambda/construct.hpp>
+#include <boost/numeric/conversion/bounds.hpp>
+#include <boost/range/algorithm/equal.hpp>
+#include <boost/typeof/typeof.hpp>
+#include <libs/assign/v2/test/optional/fun.h>
+
+namespace test_assign_v2{
+namespace xxx_optional{
+namespace xxx_fun{
+
+ void test()
+ {
+ using namespace boost;
+ namespace as2 = assign::v2;
+ {
+ // (*fp) resolves error C2440 using MSVC
+ //[test_optional_fun_math
+ std::vector<double> exponent;
+ typedef double(*fp)(double);
+ typedef function<double(double)> f_;
+ (
+ as2::put( exponent ) % ( as2::_fun = f_( fp(log10) ) )
+ )/*<<Equivalent to `as2::put( exponent )( log10( 1000.0 ) )( log10( 10.0 ) )( log10( 10000.0 ) )( log10( 1.0 ) )( log10( 100.0 ) )`>>*/( 1000.0 )( 10.0 )( 10000.0 )( 1.0 )( 100.0 );
+
+ double eps = numeric::bounds<double>::smallest();
+ BOOST_ASSIGN_V2_CHECK( fabs( exponent.front() - 3.0 ) < eps );
+ BOOST_ASSIGN_V2_CHECK( fabs( exponent.back() - 2.0 ) < eps );
+ //]
+ }
+ {
+ //[test_optional_fun_recursive
+ using namespace lambda;
+ int i = 1, k = 1;
+ BOOST_AUTO(
+ factorials, (
+ as2::deque<int>( as2::_nil ) % (
+ as2::_fun = ( var(k) *= ( var(i)++ ) )
+ )
+ )/*<<Equivalent to `factorials( k *= i++ )` for [^i = 1, ..., 5]>>*/()()()()()
+ );
+
+ BOOST_ASSIGN_V2_CHECK( range::equal( factorials, as2::csv_deque( 1, 2, 6, 24, 120 ) ) );
+ //]
+ }
+
+ }
+
+}// xxx_fun
+}// xxx_optional
+}// test_assign_v2

Modified: sandbox/assign_v2/libs/assign/v2/test/modifier/deduce.h
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/modifier/deduce.h (original)
+++ sandbox/assign_v2/libs/assign/v2/test/modifier/deduce.h 2011-03-21 14:04:06 EDT (Mon, 21 Mar 2011)
@@ -1 +1,23 @@
-// TODO remove file
\ No newline at end of file
+//////////////////////////////////////////////////////////////////////////////
+// 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_OPTIONAL_FUN_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_OPTIONAL_FUN_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_optional{
+namespace xxx_fun{
+
+ void test();
+
+}// xxx_fun
+}// xxx_optional
+}// xxx_test_assign
+
+#endif // LIBS_ASSIGN_V2_TEST_OPTIONAL_FUN_ER_2010_H

Modified: sandbox/assign_v2/libs/assign/v2/test/unit_testing/Jamfile.v2
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/unit_testing/Jamfile.v2 (original)
+++ sandbox/assign_v2/libs/assign/v2/test/unit_testing/Jamfile.v2 2011-03-21 14:04:06 EDT (Mon, 21 Mar 2011)
@@ -16,10 +16,10 @@
 }
 
 test-suite assign :
- [ assign-test detail ]
     [ assign-test deque ]
- [ assign-test fun ]
- [ assign-test modifier ]
+ [ assign-test detail ]
+ [ assign-test framework ]
+ [ assign-test optional ]
     [ assign-test put ]
     [ assign-test ref ]
     [ assign-test utility ]


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