test/graph_test.cc
author deba
Wed, 28 Jun 2006 16:27:44 +0000
changeset 2114 677ea6c8169a
parent 1956 a055123339d5
child 2121 09a07a851506
permissions -rw-r--r--
new snapshot
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@989
    41
    checkConcept<BaseIterableGraphComponent, BaseIterableGraphComponent >();
alpar@503
    42
deba@989
    43
    checkConcept<IDableGraphComponent, IDableGraphComponent >();
deba@989
    44
    checkConcept<MaxIDableGraphComponent, MaxIDableGraphComponent >();
alpar@503
    45
deba@989
    46
    checkConcept<IterableGraphComponent, IterableGraphComponent >();
alpar@503
    47
deba@989
    48
    checkConcept<MappableGraphComponent, MappableGraphComponent >();
alpar@793
    49
klao@946
    50
  }
klao@946
    51
  { // checking skeleton graphs
deba@2111
    52
    checkConcept<Graph, Graph >();
klao@946
    53
  }
klao@946
    54
  { // checking list graph
deba@2111
    55
    checkConcept<Graph, ListGraph >();
alpar@793
    56
klao@946
    57
    checkGraph<ListGraph>();
klao@946
    58
    checkGraphNodeMap<ListGraph>();
klao@946
    59
    checkGraphEdgeMap<ListGraph>();
klao@946
    60
  }
klao@946
    61
  { // checking smart graph
deba@2111
    62
    checkConcept<Graph, SmartGraph >();
alpar@733
    63
klao@946
    64
    checkGraph<SmartGraph>();
klao@946
    65
    checkGraphNodeMap<SmartGraph>();
klao@946
    66
    checkGraphEdgeMap<SmartGraph>();
alpar@503
    67
  }
klao@946
    68
  { // checking full graph
deba@2111
    69
    checkConcept<Graph, FullGraph >();
alpar@578
    70
  }
deba@1712
    71
  { // checking full graph
deba@2111
    72
    checkConcept<Graph, HyperCubeGraph >();
deba@1712
    73
  }
alpar@503
    74
alpar@503
    75
  std::cout << __FILE__ ": All tests passed.\n";
alpar@503
    76
alpar@579
    77
  return 0;
alpar@503
    78
}