//////////////////////////////////////////////////////////////////////////// // lazy_list3_tests.cpp // // more tests on list // //////////////////////////////////////////////////////////////////////////// /*============================================================================= Copyright (c) 2000-2003 Brian McNamara and Yannis Smaragdakis Copyright (c) 2001-2007 Joel de Guzman Copyright (c) 2015 John Fletcher 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 int main() { namespace phx = boost::phoenix; using boost::phoenix::arg_names::arg1; using boost::phoenix::arg_names::arg2; using namespace phx; list l = enum_from(2); list ll = take(4,l); list lll = take(12,l); list l2 = enum_from_to(2,10); list ll2 = take(4,l2); list lll2 = take(12,l2); BOOST_TEST(last(ll)() == 5); BOOST_TEST(last(lll)() == 13); BOOST_TEST(last(ll2)() == 5); BOOST_TEST(last(lll2)() == 10); return boost::report_errors(); }