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