Changeset 1076:67a115cdade4 in lemon-0.x for src/test/maps_test.cc
- Timestamp:
- 01/12/05 13:51:30 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1472
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/test/maps_test.cc
r1070 r1076 10 10 struct A {}; 11 11 struct B {}; 12 class F 13 { 14 public: 15 B operator()(const A &a) const {return B();} 16 }; 17 18 int func(A a) {return 3;} 12 19 13 20 typedef ReadMap<A,double> DoubleMap; … … 32 39 checkConcept<ReadMap<B,double>, ComposeMap<DoubleMap,ReadMap<B,A> > >(); 33 40 41 checkConcept<ReadMap<A,B>, FunctorMap<A,B,F> >(); 42 43 int a; 44 45 a=mapFunctor(constMap<A,int>(2))(A()); 46 check(a==2,"Something is wrong with mapFunctor"); 47 48 B b; 49 b=functorMap<A,B>(F())[A()]; 50 51 a=functorMap<A,int>(&func)[A()]; 52 check(a==3,"Something is wrong with functorMap"); 53 34 54 std::cout << __FILE__ ": All tests passed.\n"; 35 55
Note: See TracChangeset
for help on using the changeset viewer.