Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70009 - in trunk/libs/fusion/test: . algorithm
From: joel_at_[hidden]
Date: 2011-03-15 20:02:39


Author: djowel
Date: 2011-03-15 20:02:38 EDT (Tue, 15 Mar 2011)
New Revision: 70009
URL: http://svn.boost.org/trac/boost/changeset/70009

Log:
added test for copy
Added:
   trunk/libs/fusion/test/algorithm/copy.cpp (contents, props changed)
Text files modified:
   trunk/libs/fusion/test/Jamfile | 3 ++-
   1 files changed, 2 insertions(+), 1 deletions(-)

Modified: trunk/libs/fusion/test/Jamfile
==============================================================================
--- trunk/libs/fusion/test/Jamfile (original)
+++ trunk/libs/fusion/test/Jamfile 2011-03-15 20:02:38 EDT (Tue, 15 Mar 2011)
@@ -14,6 +14,7 @@
     [ run algorithm/all.cpp : : : : ]
     [ run algorithm/any.cpp : : : : ]
     [ run algorithm/clear.cpp : : : : ]
+ [ run algorithm/copy.cpp : : : : ]
     [ run algorithm/count.cpp : : : : ]
     [ run algorithm/count_if.cpp : : : : ]
     [ run algorithm/erase.cpp : : : : ]
@@ -111,7 +112,7 @@
     [ run sequence/zip_view2.cpp : : : : ]
     [ run sequence/zip_view_ignore.cpp : : : : ]
     [ run sequence/repetitive_view.cpp : : : : ]
- [ run sequence/deduce_sequence.cpp : : : : ]
+ [ run sequence/deduce_sequence.cpp : : : : ]
     [ run sequence/adapt_adt_named.cpp : : : : ]
     [ run sequence/adapt_adt.cpp : : : : ]
     [ run sequence/adapt_assoc_adt_named.cpp : : : : ]

Added: trunk/libs/fusion/test/algorithm/copy.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/fusion/test/algorithm/copy.cpp 2011-03-15 20:02:38 EDT (Tue, 15 Mar 2011)
@@ -0,0 +1,26 @@
+/*=============================================================================
+ Copyright (c) 2001-2011 Joel de Guzman
+
+ Distributed under 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/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/sequence/comparison.hpp>
+#include <boost/fusion/algorithm/auxiliary/copy.hpp>
+
+int
+main()
+{
+ {
+ boost::fusion::vector<int, short, double> v(1, 2, 3);
+ boost::fusion::list<int, short, double> l;
+
+ boost::fusion::copy(v, l);
+ BOOST_TEST(v == l);
+ }
+
+ return boost::report_errors();
+}
+


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