COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/test/maps_test.cc @ 1069:7b81a36809c6

Last change on this file since 1069:7b81a36809c6 was 1041:9d503ce002db, checked in by Alpar Juttner, 20 years ago
  • Several convenience maps added to maps.h
  • Improvements in doc
File size: 1.0 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 
30  checkConcept<ReadMap<B,double>, ComposeMap<DoubleMap,ReadMap<B,A> > >();
31
32  std::cout << __FILE__ ": All tests passed.\n";
33 
34  return 0;
35}
Note: See TracBrowser for help on using the repository browser.