test/graph_test.cc
author alpar
Thu, 14 Sep 2006 18:39:07 +0000
changeset 2214 a886e48e0d91
parent 2111 ea1fa1bc3f6d
child 2231 06faf3f06d67
permissions -rw-r--r--
Doc improvements
alpar@1956
     1
/* -*- C++ -*-
alpar@1956
     2
 *
alpar@1956
     3
 * This file is a part of LEMON, a generic C++ optimization library
alpar@1956
     4
 *
alpar@1956
     5
 * Copyright (C) 2003-2006
alpar@1956
     6
 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
alpar@1956
     7
 * (Egervary Research Group on Combinatorial Optimization, EGRES).
alpar@1956
     8
 *
alpar@1956
     9
 * Permission to use, modify and distribute this software is granted
alpar@1956
    10
 * provided that this copyright notice appears in all copies. For
alpar@1956
    11
 * precise terms see the accompanying LICENSE file.
alpar@1956
    12
 *
alpar@1956
    13
 * This software is provided "AS IS" with no warranty of any kind,
alpar@1956
    14
 * express or implied, and with no claim as to its suitability for any
alpar@1956
    15
 * purpose.
alpar@1956
    16
 *
alpar@1956
    17
 */
alpar@906
    18
klao@946
    19
#include <iostream>
klao@946
    20
#include <vector>
alpar@578
    21
klao@959
    22
#include <lemon/concept/graph.h>
klao@946
    23
#include <lemon/list_graph.h>
klao@946
    24
#include <lemon/smart_graph.h>
klao@946
    25
#include <lemon/full_graph.h>
deba@1712
    26
#include <lemon/hypercube_graph.h>
alpar@567
    27
klao@946
    28
#include "test_tools.h"
klao@946
    29
#include "graph_test.h"
klao@946
    30
#include "map_test.h"
alpar@503
    31
alpar@503
    32
alpar@921
    33
using namespace lemon;
klao@959
    34
using namespace lemon::concept;
alpar@503
    35
alpar@503
    36
klao@946
    37
int main() {
klao@946
    38
  { // checking graph components
deba@989
    39
    checkConcept<BaseGraphComponent, BaseGraphComponent >();
alpar@503
    40
deba@2121
    41
    checkConcept<BaseIterableGraphComponent<>, 
deba@2121
    42
      BaseIterableGraphComponent<> >();
alpar@503
    43
deba@2121
    44
    checkConcept<IDableGraphComponent<>, 
deba@2121
    45
      IDableGraphComponent<> >();
alpar@503
    46
deba@2121
    47
    checkConcept<IterableGraphComponent<>, 
deba@2121
    48
      IterableGraphComponent<> >();
alpar@503
    49
deba@2121
    50
    checkConcept<MappableGraphComponent<>, 
deba@2121
    51
      MappableGraphComponent<> >();
alpar@793
    52
klao@946
    53
  }
klao@946
    54
  { // checking skeleton graphs
deba@2121
    55
    checkConcept<Graph, Graph>();
klao@946
    56
  }
klao@946
    57
  { // checking list graph
deba@2111
    58
    checkConcept<Graph, ListGraph >();
deba@2121
    59
    checkConcept<AlterableGraphComponent<>, ListGraph>();
deba@2121
    60
    checkConcept<ExtendableGraphComponent<>, ListGraph>();
deba@2121
    61
    checkConcept<ClearableGraphComponent<>, ListGraph>();
deba@2121
    62
    checkConcept<ErasableGraphComponent<>, ListGraph>();
alpar@793
    63
klao@946
    64
    checkGraph<ListGraph>();
klao@946
    65
    checkGraphNodeMap<ListGraph>();
klao@946
    66
    checkGraphEdgeMap<ListGraph>();
klao@946
    67
  }
klao@946
    68
  { // checking smart graph
deba@2111
    69
    checkConcept<Graph, SmartGraph >();
alpar@733
    70
klao@946
    71
    checkGraph<SmartGraph>();
klao@946
    72
    checkGraphNodeMap<SmartGraph>();
klao@946
    73
    checkGraphEdgeMap<SmartGraph>();
alpar@503
    74
  }
klao@946
    75
  { // checking full graph
deba@2111
    76
    checkConcept<Graph, FullGraph >();
alpar@578
    77
  }
deba@1712
    78
  { // checking full graph
deba@2111
    79
    checkConcept<Graph, HyperCubeGraph >();
deba@1712
    80
  }
alpar@503
    81
alpar@503
    82
  std::cout << __FILE__ ": All tests passed.\n";
alpar@503
    83
alpar@579
    84
  return 0;
alpar@503
    85
}