COIN-OR::LEMON - Graph Library

source: lemon-0.x/test/graph_test.cc @ 1957:3efb110919fa

Last change on this file since 1957:3efb110919fa was 1956:a055123339d5, checked in by Alpar Juttner, 19 years ago

Unified copyright notices

File size: 2.5 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/concept/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::concept;
35
36
37int main() {
38  { // checking graph components
39    checkConcept<BaseGraphComponent, BaseGraphComponent >();
40
41    checkConcept<BaseIterableGraphComponent, BaseIterableGraphComponent >();
42
43    checkConcept<IDableGraphComponent, IDableGraphComponent >();
44    checkConcept<MaxIDableGraphComponent, MaxIDableGraphComponent >();
45
46    checkConcept<BaseExtendableGraphComponent, BaseExtendableGraphComponent >();
47    checkConcept<BaseErasableGraphComponent, BaseErasableGraphComponent >();
48
49    checkConcept<IterableGraphComponent, IterableGraphComponent >();
50
51    checkConcept<MappableGraphComponent, MappableGraphComponent >();
52
53    checkConcept<ExtendableGraphComponent, ExtendableGraphComponent >();
54    checkConcept<ErasableGraphComponent, ErasableGraphComponent >();
55    checkConcept<ClearableGraphComponent, ClearableGraphComponent >();
56  }
57  { // checking skeleton graphs
58    checkConcept<StaticGraph, StaticGraph >();
59    checkConcept<ExtendableGraph, ExtendableGraph >();
60    checkConcept<ErasableGraph, ErasableGraph >();
61  }
62  { // checking list graph
63    checkConcept<ErasableGraph, ListGraph >();
64
65    checkGraph<ListGraph>();
66    checkGraphNodeMap<ListGraph>();
67    checkGraphEdgeMap<ListGraph>();
68  }
69  { // checking smart graph
70    checkConcept<ExtendableGraph, SmartGraph >();
71
72    checkGraph<SmartGraph>();
73    checkGraphNodeMap<SmartGraph>();
74    checkGraphEdgeMap<SmartGraph>();
75  }
76  { // checking full graph
77    checkConcept<StaticGraph, FullGraph >();
78  }
79  { // checking full graph
80    checkConcept<StaticGraph, HyperCubeGraph >();
81  }
82
83  std::cout << __FILE__ ": All tests passed.\n";
84
85  return 0;
86}
Note: See TracBrowser for help on using the repository browser.