test/graph_utils_test.cc
changeset 1435 8e85e6bbefdf
parent 977 48962802d168
child 1459 2ee881cf30a8
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/graph_utils_test.cc	Mon May 23 04:48:14 2005 +0000
     1.3 @@ -0,0 +1,37 @@
     1.4 +// -*- c++ -*-
     1.5 +
     1.6 +#include <iostream>
     1.7 +#include <vector>
     1.8 +
     1.9 +#include <lemon/graph_utils.h>
    1.10 +
    1.11 +#include <lemon/list_graph.h>
    1.12 +#include <lemon/smart_graph.h>
    1.13 +#include <lemon/full_graph.h>
    1.14 +
    1.15 +#include "test_tools.h"
    1.16 +#include "graph_utils_test.h"
    1.17 +
    1.18 +
    1.19 +using namespace lemon;
    1.20 +
    1.21 +
    1.22 +int main() {
    1.23 +  ///\file
    1.24 +  { // checking list graph
    1.25 +    checkGraphCounters<ListGraph>();
    1.26 +  }
    1.27 +  { // checking smart graph
    1.28 +    checkGraphCounters<SmartGraph>();
    1.29 +  }
    1.30 +  {
    1.31 +    int num = 5;
    1.32 +    FullGraph fg(num);
    1.33 +    check(countNodes(fg) == num, "FullGraph: wrong node number.");
    1.34 +    check(countEdges(fg) == num*num, "FullGraph: wrong edge number.");    
    1.35 +  }
    1.36 +
    1.37 +  std::cout << __FILE__ ": All tests passed.\n";
    1.38 +
    1.39 +  return 0;
    1.40 +}