testing fusion transform and fold work with free functions now that only Boost.ResultOf support is required

[SVN r38063]
This commit is contained in:
Dan Marsden
2007-06-22 18:02:58 +00:00
parent 09a6da1f80
commit 996a4da2d6
2 changed files with 26 additions and 0 deletions

View File

@ -115,6 +115,11 @@ struct lvalue_adder
}
};
int add(int lhs, int rhs)
{
return lhs + rhs;
}
int
main()
{
@ -164,6 +169,11 @@ main()
BOOST_TEST(fusion::fold(vec, 0, lvalue_adder()) == 3);
}
{
vector<int, int> vec(1,2);
BOOST_TEST(fusion::fold(vec, 0, add) == 3);
}
{
typedef vector<int, char, int, double> vector_type;
vector_type v(12345, 'x', 678910, 3.36);
@ -202,6 +212,11 @@ main()
== "abcde");
}
{
vector<int, int> vec(1,2);
BOOST_TEST(fusion::accumulate(vec, 0, add) == 3);
}
return boost::report_errors();
}