alpar@906
|
1 |
/* -*- C++ -*-
|
alpar@921
|
2 |
* src/test/graph_wrapper_test.cc - Part of LEMON, a generic C++ optimization library
|
alpar@906
|
3 |
*
|
alpar@906
|
4 |
* Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
|
alpar@906
|
5 |
* (Egervary Combinatorial Optimization Research Group, EGRES).
|
alpar@906
|
6 |
*
|
alpar@906
|
7 |
* Permission to use, modify and distribute this software is granted
|
alpar@906
|
8 |
* provided that this copyright notice appears in all copies. For
|
alpar@906
|
9 |
* precise terms see the accompanying LICENSE file.
|
alpar@906
|
10 |
*
|
alpar@906
|
11 |
* This software is provided "AS IS" with no warranty of any kind,
|
alpar@906
|
12 |
* express or implied, and with no claim as to its suitability for any
|
alpar@906
|
13 |
* purpose.
|
alpar@906
|
14 |
*
|
alpar@906
|
15 |
*/
|
alpar@906
|
16 |
|
marci@849
|
17 |
#include<iostream>
|
klao@946
|
18 |
#include<lemon/concept_check.h>
|
klao@946
|
19 |
|
alpar@921
|
20 |
#include<lemon/smart_graph.h>
|
klao@959
|
21 |
#include<lemon/concept/graph.h>
|
klao@946
|
22 |
|
alpar@921
|
23 |
#include<lemon/list_graph.h>
|
alpar@921
|
24 |
#include<lemon/full_graph.h>
|
alpar@921
|
25 |
#include<lemon/graph_wrapper.h>
|
marci@849
|
26 |
|
marci@870
|
27 |
#include"test/test_tools.h"
|
marci@870
|
28 |
#include"test/graph_test.h"
|
marci@849
|
29 |
|
marci@849
|
30 |
/**
|
marci@849
|
31 |
\file
|
alpar@878
|
32 |
This test makes consistency checks of graph wrappers.
|
marci@849
|
33 |
|
alpar@878
|
34 |
\todo More extensive tests are needed
|
marci@849
|
35 |
*/
|
marci@849
|
36 |
|
alpar@921
|
37 |
using namespace lemon;
|
klao@959
|
38 |
using namespace lemon::concept;
|
marci@849
|
39 |
|
marci@849
|
40 |
|
marci@849
|
41 |
|
marci@849
|
42 |
int main()
|
marci@849
|
43 |
{
|
klao@946
|
44 |
{
|
deba@989
|
45 |
checkConcept<StaticGraph, GraphWrapper<StaticGraph> >();
|
klao@946
|
46 |
|
marci@970
|
47 |
// function_requires<StaticGraphConcept<RevGraphWrapper<Graph> > >();
|
klao@946
|
48 |
|
marci@992
|
49 |
checkConcept<StaticGraph, SubGraphWrapper<StaticGraph,
|
marci@992
|
50 |
StaticGraph::NodeMap<bool> , StaticGraph::EdgeMap<bool> > >();
|
marci@992
|
51 |
checkConcept<StaticGraph, NodeSubGraphWrapper<StaticGraph,
|
marci@992
|
52 |
StaticGraph::NodeMap<bool> > >();
|
marci@992
|
53 |
checkConcept<StaticGraph, EdgeSubGraphWrapper<StaticGraph,
|
marci@992
|
54 |
StaticGraph::EdgeMap<bool> > >();
|
marci@992
|
55 |
|
marci@992
|
56 |
checkConcept<StaticGraph, SubBidirGraphWrapper<StaticGraph,
|
marci@992
|
57 |
StaticGraph::EdgeMap<bool>, StaticGraph::EdgeMap<bool> > >();
|
klao@946
|
58 |
|
marci@992
|
59 |
checkConcept<StaticGraph, BidirGraph<StaticGraph> >();
|
klao@946
|
60 |
|
marci@992
|
61 |
checkConcept<StaticGraph, ResGraphWrapper<StaticGraph, int,
|
marci@992
|
62 |
StaticGraph::EdgeMap<int>, StaticGraph::EdgeMap<int> > >();
|
klao@946
|
63 |
|
marci@970
|
64 |
// function_requires<StaticGraphConcept<ErasingFirstGraphWrapper<Graph, Graph::NodeMap<Graph::Edge> > > >();
|
klao@946
|
65 |
}
|
marci@849
|
66 |
std::cout << __FILE__ ": All tests passed.\n";
|
marci@849
|
67 |
|
marci@849
|
68 |
return 0;
|
marci@849
|
69 |
}
|