COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/test/maps_test.cc @ 1075:789bad021e2d

Last change on this file since 1075:789bad021e2d was 1070:6aa1520a0f2f, checked in by Alpar Juttner, 16 years ago

ShiftMap? and ScaleMap? added

File size: 1.1 KB
Line 
1#include <lemon/concept_check.h>
2#include <lemon/concept/maps.h>
3#include <lemon/maps.h>
4
5#include "test_tools.h"
6
7using namespace lemon;
8using namespace lemon::concept;
9
10struct A {};
11struct B {};
12
13typedef ReadMap<A,double> DoubleMap;
14
15int 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  checkConcept<ReadMap<A,double>, ShiftMap<DoubleMap> >();
30  checkConcept<ReadMap<A,double>, ScaleMap<DoubleMap> >();
31 
32  checkConcept<ReadMap<B,double>, ComposeMap<DoubleMap,ReadMap<B,A> > >();
33
34  std::cout << __FILE__ ": All tests passed.\n";
35 
36  return 0;
37}
Note: See TracBrowser for help on using the repository browser.