test/graph_test.cc
author deba
Fri, 04 Nov 2005 10:51:35 +0000
changeset 1758 4bfe670710e0
parent 1435 8e85e6bbefdf
child 1956 a055123339d5
permissions -rw-r--r--
Doc fix
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>
deba@1712
    10
#include <lemon/hypercube_graph.h>
alpar@567
    11
klao@946
    12
#include "test_tools.h"
klao@946
    13
#include "graph_test.h"
klao@946
    14
#include "map_test.h"
alpar@503
    15
alpar@503
    16
alpar@921
    17
using namespace lemon;
klao@959
    18
using namespace lemon::concept;
alpar@503
    19
alpar@503
    20
klao@946
    21
int main() {
klao@946
    22
  { // checking graph components
deba@989
    23
    checkConcept<BaseGraphComponent, BaseGraphComponent >();
alpar@503
    24
deba@989
    25
    checkConcept<BaseIterableGraphComponent, BaseIterableGraphComponent >();
alpar@503
    26
deba@989
    27
    checkConcept<IDableGraphComponent, IDableGraphComponent >();
deba@989
    28
    checkConcept<MaxIDableGraphComponent, MaxIDableGraphComponent >();
alpar@503
    29
deba@989
    30
    checkConcept<BaseExtendableGraphComponent, BaseExtendableGraphComponent >();
deba@989
    31
    checkConcept<BaseErasableGraphComponent, BaseErasableGraphComponent >();
alpar@503
    32
deba@989
    33
    checkConcept<IterableGraphComponent, IterableGraphComponent >();
alpar@503
    34
deba@989
    35
    checkConcept<MappableGraphComponent, MappableGraphComponent >();
alpar@793
    36
deba@989
    37
    checkConcept<ExtendableGraphComponent, ExtendableGraphComponent >();
deba@989
    38
    checkConcept<ErasableGraphComponent, ErasableGraphComponent >();
deba@989
    39
    checkConcept<ClearableGraphComponent, ClearableGraphComponent >();
klao@946
    40
  }
klao@946
    41
  { // checking skeleton graphs
deba@989
    42
    checkConcept<StaticGraph, StaticGraph >();
deba@989
    43
    checkConcept<ExtendableGraph, ExtendableGraph >();
deba@989
    44
    checkConcept<ErasableGraph, ErasableGraph >();
klao@946
    45
  }
klao@946
    46
  { // checking list graph
deba@989
    47
    checkConcept<ErasableGraph, ListGraph >();
alpar@793
    48
klao@946
    49
    checkGraph<ListGraph>();
klao@946
    50
    checkGraphNodeMap<ListGraph>();
klao@946
    51
    checkGraphEdgeMap<ListGraph>();
klao@946
    52
  }
klao@946
    53
  { // checking smart graph
deba@989
    54
    checkConcept<ExtendableGraph, SmartGraph >();
alpar@733
    55
klao@946
    56
    checkGraph<SmartGraph>();
klao@946
    57
    checkGraphNodeMap<SmartGraph>();
klao@946
    58
    checkGraphEdgeMap<SmartGraph>();
alpar@503
    59
  }
klao@946
    60
  { // checking full graph
deba@989
    61
    checkConcept<StaticGraph, FullGraph >();
alpar@578
    62
  }
deba@1712
    63
  { // checking full graph
deba@1712
    64
    checkConcept<StaticGraph, HyperCubeGraph >();
deba@1712
    65
  }
alpar@503
    66
alpar@503
    67
  std::cout << __FILE__ ": All tests passed.\n";
alpar@503
    68
alpar@579
    69
  return 0;
alpar@503
    70
}