|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r70329 - sandbox/assign_v2/libs/assign/v2/test/framework
From: erwann.rogard_at_[hidden]
Date: 2011-03-21 13:55:54
Author: e_r
Date: 2011-03-21 13:55:53 EDT (Mon, 21 Mar 2011)
New Revision: 70329
URL: http://svn.boost.org/trac/boost/changeset/70329
Log:
upd assign_v2
Added:
sandbox/assign_v2/libs/assign/v2/test/framework/
sandbox/assign_v2/libs/assign/v2/test/framework/modifier.cpp (contents, props changed)
sandbox/assign_v2/libs/assign/v2/test/framework/modifier.h (contents, props changed)
Added: sandbox/assign_v2/libs/assign/v2/test/framework/modifier.cpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/framework/modifier.cpp 2011-03-21 13:55:53 EDT (Mon, 21 Mar 2011)
@@ -0,0 +1,81 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <list>
+#include <map>
+#include <queue>
+#include <set>
+#include <stack>
+#include <vector>
+#include <string>
+#include <boost/array.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/ptr_container/ptr_array.hpp>
+#include <boost/ptr_container/ptr_deque.hpp>
+#include <boost/ptr_container/ptr_list.hpp>
+#include <boost/ptr_container/ptr_vector.hpp>
+
+#include <boost/assign/v2/framework/modifier.hpp>
+#include <libs/assign/v2/test/framework/modifier.h>
+
+namespace test_assign_v2{
+namespace xxx_framework{
+namespace xxx_modifier{
+
+ // --User may skip this file-- //
+ // It checks internal details. //
+ // --------------------------- //
+
+ void test()
+ {
+ using namespace boost;
+ namespace as2 = assign::v2;
+
+ {
+ typedef as2::modifier_tag::push_back answer_;
+ as2::aux::check_deduce<std::deque<int>, answer_>();
+ as2::aux::check_deduce<std::list<int>, answer_>();
+ as2::aux::check_deduce<std::vector<int>, answer_>();
+
+ as2::aux::check_deduce<boost::ptr_deque<int>, answer_>();
+ as2::aux::check_deduce<boost::ptr_list<int>, answer_>();
+ as2::aux::check_deduce<boost::ptr_vector<int>, answer_>();
+ }
+ {
+ typedef as2::modifier_tag::iterate<> answer_;
+ as2::aux::check_deduce<boost::array<int, 1>, answer_>();
+ as2::aux::check_deduce<boost::ptr_array<int, 1>, answer_>();
+ }
+ {
+ typedef as2::modifier_tag::push answer_;
+ as2::aux::check_deduce<std::queue<int>, answer_>();
+ as2::aux::check_deduce<std::stack<int>, answer_>();
+ }
+ {
+ typedef as2::modifier_tag::insert answer_;
+ as2::aux::check_deduce<std::set<int>, answer_>();
+ typedef std::string str_;
+ as2::aux::check_deduce<std::map<str_, int>, answer_>();
+ }
+ {
+ //[put_deduce_map
+ typedef std::map<std::string, int> C;
+ typedef as2::aux::deduce_modifier_tag<C>::type found_;
+ typedef as2::modifier_tag::insert answer_;
+ BOOST_MPL_ASSERT(( boost::is_same<found_, answer_> ));
+ //]
+ }
+ }
+
+
+}// xxx_modifier
+}// xxx_framework
+}// test_assign_v2
Added: sandbox/assign_v2/libs/assign/v2/test/framework/modifier.h
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/framework/modifier.h 2011-03-21 13:55:53 EDT (Mon, 21 Mar 2011)
@@ -0,0 +1,23 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_FRAMEWORK_MODIFIER_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_FRAMEWORK_MODIFIER_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_framework{
+namespace xxx_modifier{
+
+ void test();
+
+}// xxx_modifier
+}// xxx_framework
+}// xxx_test_assign
+
+#endif // LIBS_ASSIGN_V2_TEST_FRAMEWORK_MODIFIER_ER_2010_H
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