From 690735de20a9642529e7aaaeedb7d522f8cad727 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Wed, 16 Mar 2011 00:02:38 +0000 Subject: [PATCH] added test for copy [SVN r70009] --- test/Jamfile | 3 ++- test/algorithm/copy.cpp | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 test/algorithm/copy.cpp diff --git a/test/Jamfile b/test/Jamfile index 4827bbaa..fe8829e6 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -14,6 +14,7 @@ import testing ; [ 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 @@ import testing ; [ 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 : : : : ] diff --git a/test/algorithm/copy.cpp b/test/algorithm/copy.cpp new file mode 100644 index 00000000..330caca6 --- /dev/null +++ b/test/algorithm/copy.cpp @@ -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 +#include +#include +#include +#include + +int +main() +{ + { + boost::fusion::vector v(1, 2, 3); + boost::fusion::list l; + + boost::fusion::copy(v, l); + BOOST_TEST(v == l); + } + + return boost::report_errors(); +} +