forked from boostorg/fusion
Added pop_back test for lists
[SVN r73642]
This commit is contained in:
@ -1,15 +1,17 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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/adapted/mpl.hpp>
|
||||
#include <boost/fusion/sequence/io/out.hpp>
|
||||
#include <boost/fusion/sequence/comparison/equal_to.hpp>
|
||||
#include <boost/fusion/container/generation/make_vector.hpp>
|
||||
#include <boost/fusion/container/generation/make_list.hpp>
|
||||
#include <boost/fusion/algorithm/transformation/pop_back.hpp>
|
||||
#include <boost/mpl/vector_c.hpp>
|
||||
|
||||
@ -41,6 +43,12 @@ main()
|
||||
BOOST_TEST((boost::fusion::pop_back(mpl_vec()) == make_vector(1, 2, 3, 4)));
|
||||
}
|
||||
|
||||
{
|
||||
list<int, int> l(1, 2);
|
||||
std::cout << pop_back(l) << std::endl;
|
||||
BOOST_TEST((pop_back(l) == make_list(1)));
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user