COIN-OR::LEMON - Graph Library

source: lemon-0.x/test/graph_test.cc @ 2276:1a8a66b6c6ce

Last change on this file since 2276:1a8a66b6c6ce was 2260:4274224f8a7d, checked in by Alpar Juttner, 17 years ago

concept -> concepts (namespace & directory)

File size: 2.1 KB
Line 
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 */
18
19#include <iostream>
20#include <vector>
21
22#include <lemon/concepts/graph.h>
23#include <lemon/list_graph.h>
24#include <lemon/smart_graph.h>
25#include <lemon/full_graph.h>
26#include <lemon/hypercube_graph.h>
27
28#include "test_tools.h"
29#include "graph_test.h"
30#include "map_test.h"
31
32
33using namespace lemon;
34using namespace lemon::concepts;
35
36
37int main() {
38  { // checking graph components
39    checkConcept<BaseGraphComponent, BaseGraphComponent >();
40
41    checkConcept<IDableGraphComponent<>,
42      IDableGraphComponent<> >();
43
44    checkConcept<IterableGraphComponent<>,
45      IterableGraphComponent<> >();
46
47    checkConcept<MappableGraphComponent<>,
48      MappableGraphComponent<> >();
49
50  }
51  { // checking skeleton graphs
52    checkConcept<Graph, Graph>();
53  }
54  { // checking list graph
55    checkConcept<Graph, ListGraph >();
56    checkConcept<AlterableGraphComponent<>, ListGraph>();
57    checkConcept<ExtendableGraphComponent<>, ListGraph>();
58    checkConcept<ClearableGraphComponent<>, ListGraph>();
59    checkConcept<ErasableGraphComponent<>, ListGraph>();
60
61    checkGraph<ListGraph>();
62    checkGraphNodeMap<ListGraph>();
63    checkGraphEdgeMap<ListGraph>();
64  }
65  { // checking smart graph
66    checkConcept<Graph, SmartGraph >();
67
68    checkGraph<SmartGraph>();
69    checkGraphNodeMap<SmartGraph>();
70    checkGraphEdgeMap<SmartGraph>();
71  }
72  { // checking full graph
73    checkConcept<Graph, FullGraph >();
74  }
75  { // checking full graph
76    checkConcept<Graph, HyperCubeGraph >();
77  }
78
79  std::cout << __FILE__ ": All tests passed.\n";
80
81  return 0;
82}
Note: See TracBrowser for help on using the repository browser.