alpar@1041
|
1 |
#include <lemon/concept_check.h>
|
alpar@1041
|
2 |
#include <lemon/concept/maps.h>
|
alpar@1041
|
3 |
#include <lemon/maps.h>
|
alpar@1041
|
4 |
|
alpar@1041
|
5 |
#include "test_tools.h"
|
alpar@1041
|
6 |
|
alpar@1041
|
7 |
using namespace lemon;
|
alpar@1041
|
8 |
using namespace lemon::concept;
|
alpar@1041
|
9 |
|
alpar@1041
|
10 |
struct A {};
|
alpar@1041
|
11 |
struct B {};
|
alpar@1041
|
12 |
|
alpar@1041
|
13 |
typedef ReadMap<A,double> DoubleMap;
|
alpar@1041
|
14 |
|
alpar@1041
|
15 |
int main()
|
alpar@1041
|
16 |
{ // checking graph components
|
alpar@1041
|
17 |
|
alpar@1041
|
18 |
checkConcept<ReadMap<A,B>, ReadMap<A,B> >();
|
alpar@1041
|
19 |
checkConcept<WriteMap<A,B>, WriteMap<A,B> >();
|
alpar@1041
|
20 |
checkConcept<ReadWriteMap<A,B>, ReadWriteMap<A,B> >();
|
alpar@1041
|
21 |
checkConcept<ReferenceMap<A,B,B&,const B&>, ReferenceMap<A,B,B&,const B&> >();
|
alpar@1041
|
22 |
|
alpar@1041
|
23 |
checkConcept<ReadMap<A,double>, AddMap<DoubleMap,DoubleMap> >();
|
alpar@1041
|
24 |
checkConcept<ReadMap<A,double>, SubMap<DoubleMap,DoubleMap> >();
|
alpar@1041
|
25 |
checkConcept<ReadMap<A,double>, MulMap<DoubleMap,DoubleMap> >();
|
alpar@1041
|
26 |
checkConcept<ReadMap<A,double>, DivMap<DoubleMap,DoubleMap> >();
|
alpar@1041
|
27 |
checkConcept<ReadMap<A,double>, NegMap<DoubleMap> >();
|
alpar@1041
|
28 |
checkConcept<ReadMap<A,double>, AbsMap<DoubleMap> >();
|
alpar@1041
|
29 |
|
alpar@1041
|
30 |
checkConcept<ReadMap<B,double>, ComposeMap<DoubleMap,ReadMap<B,A> > >();
|
alpar@1041
|
31 |
|
alpar@1041
|
32 |
std::cout << __FILE__ ": All tests passed.\n";
|
alpar@1041
|
33 |
|
alpar@1041
|
34 |
return 0;
|
alpar@1041
|
35 |
}
|