src/test/kruskal_test.cc
changeset 885 5e59c44b6ba2
parent 880 9d0bfd35b97c
child 906 17f31d280385
     1.1 --- a/src/test/kruskal_test.cc	Sun Sep 19 13:39:25 2004 +0000
     1.2 +++ b/src/test/kruskal_test.cc	Sun Sep 19 15:24:56 2004 +0000
     1.3 @@ -81,6 +81,15 @@
     1.4  	==-31,
     1.5  	"Total cost should be -31.");
     1.6  
     1.7 +  tree_edge_vec.clear();
     1.8 +
     1.9 +  //The above test could also be coded like this:
    1.10 +  check(kruskal(G,
    1.11 +		makeKruskalMapInput(G, edge_cost_map),
    1.12 +		makeKruskalSequenceOutput(back_inserter(tree_edge_vec)))
    1.13 +	==-31,
    1.14 +	"Total cost should be -31.");
    1.15 +
    1.16    check(tree_edge_vec.size()==5,"The tree should have 5 edges.");
    1.17  
    1.18    check(tree_edge_vec[0]==e1 &&