forked from boostorg/fusion
testing the zip algorithm with unused arg
[SVN r37151]
This commit is contained in:
@ -41,6 +41,7 @@ import testing ;
|
|||||||
[ run algorithm/join.cpp : : : : ]
|
[ run algorithm/join.cpp : : : : ]
|
||||||
[ run algorithm/zip.cpp : : : : ]
|
[ run algorithm/zip.cpp : : : : ]
|
||||||
[ run algorithm/zip2.cpp : : : : ]
|
[ run algorithm/zip2.cpp : : : : ]
|
||||||
|
[ run algorithm/zip_ignore.cpp : : : : ]
|
||||||
|
|
||||||
[ run sequence/as_list.cpp : : : : ]
|
[ run sequence/as_list.cpp : : : : ]
|
||||||
[ run sequence/as_map.cpp : : : : ]
|
[ run sequence/as_map.cpp : : : : ]
|
||||||
|
28
test/algorithm/zip_ignore.cpp
Normal file
28
test/algorithm/zip_ignore.cpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*=============================================================================
|
||||||
|
Copyright (c) 2001-2007 Joel de Guzman
|
||||||
|
Copyright (c) 2007 Dan Marsden
|
||||||
|
|
||||||
|
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/sequence/container/vector.hpp>
|
||||||
|
#include <boost/fusion/algorithm/transformation/zip.hpp>
|
||||||
|
#include <boost/fusion/support/unused.hpp>
|
||||||
|
#include <boost/fusion/iterator.hpp>
|
||||||
|
#include <boost/fusion/sequence/intrinsic.hpp>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
using namespace boost::fusion;
|
||||||
|
{
|
||||||
|
vector<int, int> iv(1,2);
|
||||||
|
vector<char, char> cv('a', 'b');
|
||||||
|
BOOST_TEST(at_c<0>(at_c<0>(zip(iv, unused, cv))) == 1);
|
||||||
|
BOOST_TEST(at_c<2>(at_c<0>(zip(iv, unused, cv))) == 'a');
|
||||||
|
|
||||||
|
BOOST_TEST(at_c<0>(at_c<1>(zip(iv, unused, cv))) == 2);
|
||||||
|
BOOST_TEST(at_c<2>(at_c<1>(zip(iv, unused, cv))) == 'b');
|
||||||
|
}
|
||||||
|
return boost::report_errors();
|
||||||
|
}
|
Reference in New Issue
Block a user