Last change
on this file since 1059:bd97feae7d90 was
977:48962802d168,
checked in by Mihaly Barasz, 20 years ago
|
- enable_if imported from BOOST
- count{Nodes,Edges} implemented via graph tags
- some #include bugs fixed
|
File size:
677 bytes
|
Rev | Line | |
---|
[946] | 1 | // -*- c++ -*- |
---|
| 2 | |
---|
| 3 | #include <iostream> |
---|
| 4 | #include <vector> |
---|
| 5 | |
---|
[977] | 6 | #include <lemon/graph_utils.h> |
---|
| 7 | |
---|
[946] | 8 | #include <lemon/list_graph.h> |
---|
| 9 | #include <lemon/smart_graph.h> |
---|
| 10 | #include <lemon/full_graph.h> |
---|
| 11 | |
---|
| 12 | #include "test_tools.h" |
---|
| 13 | #include "graph_utils_test.h" |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | using namespace lemon; |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | int main() { |
---|
| 20 | ///\file |
---|
| 21 | { // checking list graph |
---|
| 22 | checkGraphCounters<ListGraph>(); |
---|
| 23 | } |
---|
| 24 | { // checking smart graph |
---|
| 25 | checkGraphCounters<SmartGraph>(); |
---|
| 26 | } |
---|
[977] | 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 | } |
---|
[946] | 33 | |
---|
| 34 | std::cout << __FILE__ ": All tests passed.\n"; |
---|
| 35 | |
---|
| 36 | return 0; |
---|
| 37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.