src/test/graph_test.cc
author marci
Thu, 17 Feb 2005 15:14:13 +0000
changeset 1153 4b0468de3a31
parent 1022 567f392d1d2e
permissions -rw-r--r--
if you have a nuclear power plant and wanna compute small magic squares, then let's do it
klao@946
     1
// -*- c++ -*-
alpar@906
     2
klao@946
     3
#include <iostream>
klao@946
     4
#include <vector>
alpar@578
     5
klao@959
     6
#include <lemon/concept/graph.h>
klao@946
     7
#include <lemon/list_graph.h>
klao@946
     8
#include <lemon/smart_graph.h>
klao@946
     9
#include <lemon/full_graph.h>
alpar@567
    10
klao@946
    11
#include "test_tools.h"
klao@946
    12
#include "graph_test.h"
klao@946
    13
#include "map_test.h"
alpar@503
    14
alpar@503
    15
alpar@921
    16
using namespace lemon;
klao@959
    17
using namespace lemon::concept;
alpar@503
    18
alpar@503
    19
klao@946
    20
int main() {
klao@946
    21
  { // checking graph components
deba@989
    22
    checkConcept<BaseGraphComponent, BaseGraphComponent >();
alpar@503
    23
deba@989
    24
    checkConcept<BaseIterableGraphComponent, BaseIterableGraphComponent >();
alpar@503
    25
deba@989
    26
    checkConcept<IDableGraphComponent, IDableGraphComponent >();
deba@989
    27
    checkConcept<MaxIDableGraphComponent, MaxIDableGraphComponent >();
alpar@503
    28
deba@989
    29
    checkConcept<BaseExtendableGraphComponent, BaseExtendableGraphComponent >();
deba@989
    30
    checkConcept<BaseErasableGraphComponent, BaseErasableGraphComponent >();
alpar@503
    31
deba@989
    32
    checkConcept<IterableGraphComponent, IterableGraphComponent >();
alpar@503
    33
deba@989
    34
    checkConcept<MappableGraphComponent, MappableGraphComponent >();
alpar@793
    35
deba@989
    36
    checkConcept<ExtendableGraphComponent, ExtendableGraphComponent >();
deba@989
    37
    checkConcept<ErasableGraphComponent, ErasableGraphComponent >();
deba@989
    38
    checkConcept<ClearableGraphComponent, ClearableGraphComponent >();
klao@946
    39
  }
klao@946
    40
  { // checking skeleton graphs
deba@989
    41
    checkConcept<StaticGraph, StaticGraph >();
deba@989
    42
    checkConcept<ExtendableGraph, ExtendableGraph >();
deba@989
    43
    checkConcept<ErasableGraph, ErasableGraph >();
klao@946
    44
  }
klao@946
    45
  { // checking list graph
deba@989
    46
    checkConcept<ErasableGraph, ListGraph >();
alpar@793
    47
klao@946
    48
    checkGraph<ListGraph>();
klao@946
    49
    checkGraphNodeMap<ListGraph>();
klao@946
    50
    checkGraphEdgeMap<ListGraph>();
klao@946
    51
  }
klao@946
    52
  { // checking smart graph
deba@989
    53
    checkConcept<ExtendableGraph, SmartGraph >();
alpar@733
    54
klao@946
    55
    checkGraph<SmartGraph>();
klao@946
    56
    checkGraphNodeMap<SmartGraph>();
klao@946
    57
    checkGraphEdgeMap<SmartGraph>();
alpar@503
    58
  }
klao@946
    59
  { // checking full graph
deba@989
    60
    checkConcept<StaticGraph, FullGraph >();
alpar@578
    61
  }
alpar@503
    62
alpar@503
    63
  std::cout << __FILE__ ": All tests passed.\n";
alpar@503
    64
alpar@579
    65
  return 0;
alpar@503
    66
}