diff -r 648aa2f33dc8 -r fa89ffb27a6d test/maps_test.cc --- a/test/maps_test.cc Thu Sep 01 20:35:30 2005 +0000 +++ b/test/maps_test.cc Thu Sep 08 14:34:50 2005 +0000 @@ -9,14 +9,19 @@ struct A {}; struct B {}; -class F -{ + +class F { public: + typedef A argument_type; + typedef B result_type; + B operator()(const A &) const {return B();} }; int func(A) {return 3;} +int binc(int, B) {return 4;} + typedef ReadMap DoubleMap; int main() @@ -38,7 +43,7 @@ checkConcept, ComposeMap > >(); - checkConcept, FunctorMap >(); + checkConcept, FunctorMap >(); int a; @@ -46,11 +51,15 @@ check(a==2,"Something is wrong with mapFunctor"); B b; - b=functorMap(F())[A()]; + b=functorMap(F())[A()]; - a=functorMap(&func)[A()]; + a=functorMap(&func)[A()]; check(a==3,"Something is wrong with functorMap"); + a=combineMap(constMap(), identityMap(), &binc)[B()]; + check(a==4,"Something is wrong with combineMap"); + + std::cout << __FILE__ ": All tests passed.\n"; return 0;