src/test/graph_test.cc
author ladanyi
Fri, 05 Nov 2004 05:46:46 +0000
changeset 963 5a7556e9e340
parent 946 c94ef40a22ce
child 980 0f1044b7a3af
permissions -rw-r--r--
Updated the makefile.
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
  ///\file
klao@946
    22
  { // checking graph components
klao@946
    23
    function_requires<BaseGraphComponentConcept<BaseGraphComponent> >();
alpar@503
    24
klao@946
    25
    function_requires<BaseIterableGraphComponentConcept<BaseIterableGraphComponent> >();
alpar@503
    26
klao@946
    27
    function_requires<IDableGraphComponentConcept<IDableGraphComponent> >();
klao@946
    28
    function_requires<MaxIDableGraphComponentConcept<MaxIDableGraphComponent> >();
alpar@503
    29
klao@946
    30
    function_requires<BaseExtendableGraphComponentConcept<BaseExtendableGraphComponent> >();
klao@946
    31
    function_requires<BaseErasableGraphComponentConcept<BaseErasableGraphComponent> >();
klao@946
    32
    function_requires<BaseClearableGraphComponentConcept<BaseClearableGraphComponent> >();
alpar@503
    33
klao@946
    34
    function_requires<IterableGraphComponentConcept<IterableGraphComponent> >();
alpar@503
    35
klao@946
    36
    function_requires<IdMappableGraphComponentConcept<IdMappableGraphComponent> >();
klao@946
    37
    function_requires<MappableGraphComponentConcept<MappableGraphComponent> >();
alpar@793
    38
klao@946
    39
    function_requires<ExtendableGraphComponentConcept<ExtendableGraphComponent> >();
klao@946
    40
    function_requires<ErasableGraphComponentConcept<ErasableGraphComponent> >();
klao@946
    41
    function_requires<ClearableGraphComponentConcept<ClearableGraphComponent> >();
klao@946
    42
  }
klao@946
    43
  { // checking skeleton graphs
klao@946
    44
    function_requires<StaticGraphConcept<StaticGraph> >();
klao@946
    45
    function_requires<ExtendableGraphConcept<ExtendableGraph> >();
klao@946
    46
    function_requires<ErasableGraphConcept<ErasableGraph> >();
klao@946
    47
  }
klao@946
    48
  { // checking list graph
klao@946
    49
    function_requires<ErasableGraphConcept<ListGraph> >();
alpar@793
    50
klao@946
    51
    checkGraph<ListGraph>();
klao@946
    52
    checkGraphNodeMap<ListGraph>();
klao@946
    53
    checkGraphEdgeMap<ListGraph>();
klao@946
    54
  }
klao@946
    55
  { // checking smart graph
klao@946
    56
    function_requires<ExtendableGraphConcept<SmartGraph> >();
alpar@733
    57
klao@946
    58
    checkGraph<SmartGraph>();
klao@946
    59
    checkGraphNodeMap<SmartGraph>();
klao@946
    60
    checkGraphEdgeMap<SmartGraph>();
alpar@503
    61
  }
klao@946
    62
  { // checking full graph
klao@946
    63
    function_requires<StaticGraphConcept<FullGraph> >();
alpar@578
    64
  }
alpar@503
    65
alpar@503
    66
  std::cout << __FILE__ ": All tests passed.\n";
alpar@503
    67
alpar@579
    68
  return 0;
alpar@503
    69
}