test/digraph_test.cc
author Balazs Dezso <deba@inf.elte.hu>
Fri, 25 Jan 2008 15:23:28 +0100
changeset 62 4790635473ef
child 107 31a2e6d28f61
permissions -rw-r--r--
Array range check warning workaround in random.h

The g++-4.2.1 preferred by OpenSUSE has a bug with array range cheking
deba@57
     1
/* -*- C++ -*-
deba@57
     2
 *
deba@57
     3
 * This file is a part of LEMON, a generic C++ optimization library
deba@57
     4
 *
deba@57
     5
 * Copyright (C) 2003-2007
deba@57
     6
 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
deba@57
     7
 * (Egervary Research Group on Combinatorial Optimization, EGRES).
deba@57
     8
 *
deba@57
     9
 * Permission to use, modify and distribute this software is granted
deba@57
    10
 * provided that this copyright notice appears in all copies. For
deba@57
    11
 * precise terms see the accompanying LICENSE file.
deba@57
    12
 *
deba@57
    13
 * This software is provided "AS IS" with no warranty of any kind,
deba@57
    14
 * express or implied, and with no claim as to its suitability for any
deba@57
    15
 * purpose.
deba@57
    16
 *
deba@57
    17
 */
deba@57
    18
deba@57
    19
#include <iostream>
deba@57
    20
#include <vector>
deba@57
    21
deba@57
    22
#include <lemon/concepts/digraph.h>
deba@57
    23
#include <lemon/list_graph.h>
deba@57
    24
//#include <lemon/smart_graph.h>
deba@57
    25
//#include <lemon/full_graph.h>
deba@57
    26
//#include <lemon/hypercube_graph.h>
deba@57
    27
deba@57
    28
#include "test_tools.h"
deba@57
    29
#include "digraph_test.h"
deba@57
    30
#include "map_test.h"
deba@57
    31
deba@57
    32
deba@57
    33
using namespace lemon;
deba@57
    34
using namespace lemon::concepts;
deba@57
    35
deba@57
    36
deba@57
    37
int main() {
deba@57
    38
  { // checking digraph components
deba@57
    39
    checkConcept<BaseDigraphComponent, BaseDigraphComponent >();
deba@57
    40
deba@57
    41
    checkConcept<IDableDigraphComponent<>, 
deba@57
    42
      IDableDigraphComponent<> >();
deba@57
    43
deba@57
    44
    checkConcept<IterableDigraphComponent<>, 
deba@57
    45
      IterableDigraphComponent<> >();
deba@57
    46
deba@57
    47
    checkConcept<MappableDigraphComponent<>, 
deba@57
    48
      MappableDigraphComponent<> >();
deba@57
    49
deba@57
    50
  }
deba@57
    51
  { // checking skeleton digraphs
deba@57
    52
    checkConcept<Digraph, Digraph>();
deba@57
    53
  }
deba@57
    54
  { // checking list digraph
deba@57
    55
    checkConcept<Digraph, ListDigraph >();
deba@57
    56
    checkConcept<AlterableDigraphComponent<>, ListDigraph>();
deba@57
    57
    checkConcept<ExtendableDigraphComponent<>, ListDigraph>();
deba@57
    58
    checkConcept<ClearableDigraphComponent<>, ListDigraph>();
deba@57
    59
    checkConcept<ErasableDigraphComponent<>, ListDigraph>();
deba@57
    60
deba@57
    61
    checkDigraph<ListDigraph>();
deba@57
    62
    checkGraphNodeMap<ListDigraph>();
deba@57
    63
    checkGraphArcMap<ListDigraph>();
deba@57
    64
  }
deba@57
    65
//   { // checking smart digraph
deba@57
    66
//     checkConcept<Digraph, SmartDigraph >();
deba@57
    67
deba@57
    68
//     checkDigraph<SmartDigraph>();
deba@57
    69
//     checkDigraphNodeMap<SmartDigraph>();
deba@57
    70
//     checkDigraphArcMap<SmartDigraph>();
deba@57
    71
//   }
deba@57
    72
//   { // checking full digraph
deba@57
    73
//     checkConcept<Digraph, FullDigraph >();
deba@57
    74
//   }
deba@57
    75
//   { // checking full digraph
deba@57
    76
//     checkConcept<Digraph, HyperCubeDigraph >();
deba@57
    77
//   }
deba@57
    78
deba@57
    79
  std::cout << __FILE__ ": All tests passed.\n";
deba@57
    80
deba@57
    81
  return 0;
deba@57
    82
}