mirror of
https://github.com/boostorg/phoenix.git
synced 2026-02-18 14:22:09 +00:00
lazy_list3_tests Add more tests
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
int main()
|
||||
{
|
||||
namespace phx = boost::phoenix;
|
||||
using boost::phoenix::arg_names::arg1;
|
||||
using boost::phoenix::arg_names::arg2;
|
||||
//using boost::phoenix::arg_names::arg1;
|
||||
//using boost::phoenix::arg_names::arg2;
|
||||
using namespace phx;
|
||||
|
||||
list<int> l = enum_from(2);
|
||||
@@ -33,11 +33,15 @@ int main()
|
||||
list<int> l2 = enum_from_to(2,10);
|
||||
list<int> ll2 = take(4,l2);
|
||||
list<int> lll2 = take(12,l2);
|
||||
|
||||
list<int> evens = filter(even,l);
|
||||
list<int> even4 = take(4,evens)();
|
||||
|
||||
BOOST_TEST(last(ll)() == 5);
|
||||
BOOST_TEST(last(lll)() == 13);
|
||||
BOOST_TEST(last(ll2)() == 5);
|
||||
BOOST_TEST(last(lll2)() == 10);
|
||||
|
||||
BOOST_TEST(length(lll2)() == 9);
|
||||
BOOST_TEST(at(even4,3)() == 8);
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user