[849] | 1 | #include<iostream> |
---|
| 2 | #include<hugo/smart_graph.h> |
---|
| 3 | #include<hugo/skeletons/graph.h> |
---|
| 4 | #include<hugo/list_graph.h> |
---|
| 5 | #include<hugo/full_graph.h> |
---|
| 6 | #include<hugo/graph_wrapper.h> |
---|
| 7 | |
---|
[870] | 8 | #include"test/test_tools.h" |
---|
| 9 | #include"test/graph_test.h" |
---|
[849] | 10 | |
---|
| 11 | /** |
---|
| 12 | \file |
---|
[878] | 13 | This test makes consistency checks of graph wrappers. |
---|
[849] | 14 | |
---|
[878] | 15 | \todo More extensive tests are needed |
---|
[849] | 16 | */ |
---|
| 17 | |
---|
| 18 | using namespace hugo; |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | typedef SmartGraph Graph; |
---|
[891] | 22 | |
---|
| 23 | //Compile GraphWrapper |
---|
[849] | 24 | typedef GraphWrapper<Graph> GW; |
---|
| 25 | template void checkCompileStaticGraph<GW>(GW &); |
---|
| 26 | |
---|
[891] | 27 | //Compile RevGraphWrapper |
---|
[849] | 28 | typedef RevGraphWrapper<Graph> RevGW; |
---|
| 29 | template void checkCompileStaticGraph<RevGW>(RevGW &); |
---|
[891] | 30 | |
---|
| 31 | //Compile SubGraphWrapper |
---|
| 32 | typedef SubGraphWrapper<Graph, Graph::NodeMap<bool>, |
---|
| 33 | Graph::EdgeMap<bool> > SubGW; |
---|
| 34 | template void checkCompileStaticGraph<SubGW>(SubGW &); |
---|
| 35 | |
---|
| 36 | //Compile UndirGraphWrapper |
---|
| 37 | /// \bug UndirGraphWrapper cannot pass the StaticGraph test |
---|
| 38 | //typedef UndirGraphWrapper<Graph> UndirGW; |
---|
| 39 | //template void checkCompileStaticGraph<UndirGW>(UndirGW &); |
---|
| 40 | |
---|
| 41 | //Compile UndirGraph |
---|
| 42 | //typedef UndirGraph<Graph> UndirG; |
---|
| 43 | //template void checkCompileStaticGraph<UndirG>(UndirG &); |
---|
| 44 | |
---|
[892] | 45 | //Compile SubBidirGraphWrapper |
---|
| 46 | typedef SubBidirGraphWrapper<Graph, Graph::EdgeMap<bool>, |
---|
| 47 | Graph::EdgeMap<bool> > SubBDGW; |
---|
| 48 | template void checkCompileStaticGraph<SubBDGW>(SubBDGW &); |
---|
[891] | 49 | |
---|
| 50 | //Compile BidirGraphWrapper |
---|
[892] | 51 | typedef BidirGraphWrapper<Graph> BidirGW; |
---|
| 52 | template void checkCompileStaticGraph<BidirGW>(BidirGW &); |
---|
[891] | 53 | |
---|
| 54 | //Compile BidirGraph |
---|
[892] | 55 | typedef BidirGraph<Graph> BidirG; |
---|
| 56 | template void checkCompileStaticGraph<BidirG>(BidirG &); |
---|
[891] | 57 | |
---|
| 58 | //Compile ResGraphWrapper |
---|
[892] | 59 | typedef ResGraphWrapper<Graph, int, Graph::EdgeMap<int>, |
---|
| 60 | Graph::EdgeMap<int> > ResGW; |
---|
| 61 | template void checkCompileStaticGraph<ResGW>(ResGW &); |
---|
[891] | 62 | |
---|
| 63 | //Compile ErasingFirstGraphWrapper |
---|
| 64 | typedef ErasingFirstGraphWrapper<Graph, Graph::NodeMap<Graph::Edge> > ErasingFirstGW; |
---|
| 65 | template void checkCompileStaticGraph<ErasingFirstGW>(ErasingFirstGW &); |
---|
[849] | 66 | |
---|
| 67 | |
---|
| 68 | int main() |
---|
| 69 | { |
---|
| 70 | std::cout << __FILE__ ": All tests passed.\n"; |
---|
| 71 | |
---|
| 72 | return 0; |
---|
| 73 | } |
---|