src/test/graph_utils_test.cc
changeset 1374 bcfa3980b432
parent 946 c94ef40a22ce
equal deleted inserted replaced
0:57e68f002aff 1:7b52ece67590
     1 // -*- c++ -*-
     1 // -*- c++ -*-
     2 
     2 
     3 #include <iostream>
     3 #include <iostream>
     4 #include <vector>
     4 #include <vector>
       
     5 
       
     6 #include <lemon/graph_utils.h>
     5 
     7 
     6 #include <lemon/list_graph.h>
     8 #include <lemon/list_graph.h>
     7 #include <lemon/smart_graph.h>
     9 #include <lemon/smart_graph.h>
     8 #include <lemon/full_graph.h>
    10 #include <lemon/full_graph.h>
     9 
    11 
    20     checkGraphCounters<ListGraph>();
    22     checkGraphCounters<ListGraph>();
    21   }
    23   }
    22   { // checking smart graph
    24   { // checking smart graph
    23     checkGraphCounters<SmartGraph>();
    25     checkGraphCounters<SmartGraph>();
    24   }
    26   }
       
    27   {
       
    28     int num = 5;
       
    29     FullGraph fg(num);
       
    30     check(countNodes(fg) == num, "FullGraph: wrong node number.");
       
    31     check(countEdges(fg) == num*num, "FullGraph: wrong edge number.");    
       
    32   }
    25 
    33 
    26   std::cout << __FILE__ ": All tests passed.\n";
    34   std::cout << __FILE__ ": All tests passed.\n";
    27 
    35 
    28   return 0;
    36   return 0;
    29 }
    37 }