alpar@1956
|
1 |
/* -*- C++ -*-
|
alpar@1956
|
2 |
*
|
alpar@1956
|
3 |
* This file is a part of LEMON, a generic C++ optimization library
|
alpar@1956
|
4 |
*
|
alpar@1956
|
5 |
* Copyright (C) 2003-2006
|
alpar@1956
|
6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
|
alpar@1956
|
7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES).
|
alpar@1956
|
8 |
*
|
alpar@1956
|
9 |
* Permission to use, modify and distribute this software is granted
|
alpar@1956
|
10 |
* provided that this copyright notice appears in all copies. For
|
alpar@1956
|
11 |
* precise terms see the accompanying LICENSE file.
|
alpar@1956
|
12 |
*
|
alpar@1956
|
13 |
* This software is provided "AS IS" with no warranty of any kind,
|
alpar@1956
|
14 |
* express or implied, and with no claim as to its suitability for any
|
alpar@1956
|
15 |
* purpose.
|
alpar@1956
|
16 |
*
|
alpar@1956
|
17 |
*/
|
alpar@906
|
18 |
|
klao@946
|
19 |
#include <iostream>
|
klao@946
|
20 |
#include <vector>
|
alpar@578
|
21 |
|
alpar@2260
|
22 |
#include <lemon/concepts/graph.h>
|
klao@946
|
23 |
#include <lemon/list_graph.h>
|
klao@946
|
24 |
#include <lemon/smart_graph.h>
|
klao@946
|
25 |
#include <lemon/full_graph.h>
|
deba@1712
|
26 |
#include <lemon/hypercube_graph.h>
|
alpar@567
|
27 |
|
klao@946
|
28 |
#include "test_tools.h"
|
klao@946
|
29 |
#include "graph_test.h"
|
klao@946
|
30 |
#include "map_test.h"
|
alpar@503
|
31 |
|
alpar@503
|
32 |
|
alpar@921
|
33 |
using namespace lemon;
|
alpar@2260
|
34 |
using namespace lemon::concepts;
|
alpar@503
|
35 |
|
alpar@503
|
36 |
|
klao@946
|
37 |
int main() {
|
klao@946
|
38 |
{ // checking graph components
|
deba@989
|
39 |
checkConcept<BaseGraphComponent, BaseGraphComponent >();
|
alpar@503
|
40 |
|
deba@2121
|
41 |
checkConcept<IDableGraphComponent<>,
|
deba@2121
|
42 |
IDableGraphComponent<> >();
|
alpar@503
|
43 |
|
deba@2121
|
44 |
checkConcept<IterableGraphComponent<>,
|
deba@2121
|
45 |
IterableGraphComponent<> >();
|
alpar@503
|
46 |
|
deba@2121
|
47 |
checkConcept<MappableGraphComponent<>,
|
deba@2121
|
48 |
MappableGraphComponent<> >();
|
alpar@793
|
49 |
|
klao@946
|
50 |
}
|
klao@946
|
51 |
{ // checking skeleton graphs
|
deba@2121
|
52 |
checkConcept<Graph, Graph>();
|
klao@946
|
53 |
}
|
klao@946
|
54 |
{ // checking list graph
|
deba@2111
|
55 |
checkConcept<Graph, ListGraph >();
|
deba@2121
|
56 |
checkConcept<AlterableGraphComponent<>, ListGraph>();
|
deba@2121
|
57 |
checkConcept<ExtendableGraphComponent<>, ListGraph>();
|
deba@2121
|
58 |
checkConcept<ClearableGraphComponent<>, ListGraph>();
|
deba@2121
|
59 |
checkConcept<ErasableGraphComponent<>, ListGraph>();
|
alpar@793
|
60 |
|
klao@946
|
61 |
checkGraph<ListGraph>();
|
klao@946
|
62 |
checkGraphNodeMap<ListGraph>();
|
klao@946
|
63 |
checkGraphEdgeMap<ListGraph>();
|
klao@946
|
64 |
}
|
klao@946
|
65 |
{ // checking smart graph
|
deba@2111
|
66 |
checkConcept<Graph, SmartGraph >();
|
alpar@733
|
67 |
|
klao@946
|
68 |
checkGraph<SmartGraph>();
|
klao@946
|
69 |
checkGraphNodeMap<SmartGraph>();
|
klao@946
|
70 |
checkGraphEdgeMap<SmartGraph>();
|
alpar@503
|
71 |
}
|
klao@946
|
72 |
{ // checking full graph
|
deba@2111
|
73 |
checkConcept<Graph, FullGraph >();
|
alpar@578
|
74 |
}
|
deba@1712
|
75 |
{ // checking full graph
|
deba@2111
|
76 |
checkConcept<Graph, HyperCubeGraph >();
|
deba@1712
|
77 |
}
|
alpar@503
|
78 |
|
alpar@503
|
79 |
std::cout << __FILE__ ": All tests passed.\n";
|
alpar@503
|
80 |
|
alpar@579
|
81 |
return 0;
|
alpar@503
|
82 |
}
|