[1041] | 1 | #include <lemon/concept_check.h> |
---|

| 2 | #include <lemon/concept/maps.h> |
---|

| 3 | #include <lemon/maps.h> |
---|

| 4 | |
---|

| 5 | #include "test_tools.h" |
---|

| 6 | |
---|

| 7 | using namespace lemon; |
---|

| 8 | using namespace lemon::concept; |
---|

| 9 | |
---|

| 10 | struct A {}; |
---|

| 11 | struct B {}; |
---|

| 12 | |
---|

| 13 | typedef ReadMap<A,double> DoubleMap; |
---|

| 14 | |
---|

| 15 | int main() |
---|

| 16 | { // checking graph components |
---|

| 17 | |
---|

| 18 | checkConcept<ReadMap<A,B>, ReadMap<A,B> >(); |
---|

| 19 | checkConcept<WriteMap<A,B>, WriteMap<A,B> >(); |
---|

| 20 | checkConcept<ReadWriteMap<A,B>, ReadWriteMap<A,B> >(); |
---|

| 21 | checkConcept<ReferenceMap<A,B,B&,const B&>, ReferenceMap<A,B,B&,const B&> >(); |
---|

| 22 | |
---|

| 23 | checkConcept<ReadMap<A,double>, AddMap<DoubleMap,DoubleMap> >(); |
---|

| 24 | checkConcept<ReadMap<A,double>, SubMap<DoubleMap,DoubleMap> >(); |
---|

| 25 | checkConcept<ReadMap<A,double>, MulMap<DoubleMap,DoubleMap> >(); |
---|

| 26 | checkConcept<ReadMap<A,double>, DivMap<DoubleMap,DoubleMap> >(); |
---|

| 27 | checkConcept<ReadMap<A,double>, NegMap<DoubleMap> >(); |
---|

| 28 | checkConcept<ReadMap<A,double>, AbsMap<DoubleMap> >(); |
---|

| 29 | |
---|

| 30 | checkConcept<ReadMap<B,double>, ComposeMap<DoubleMap,ReadMap<B,A> > >(); |
---|

| 31 | |
---|

| 32 | std::cout << __FILE__ ": All tests passed.\n"; |
---|

| 33 | |
---|

| 34 | return 0; |
---|

| 35 | } |
---|