diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 1bef30a2..11cfbdaa 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -22,6 +22,8 @@ path-constant CYCLE_RATIO_INPUT_FILE : ./cycle_ratio_s382.90.dot ; path-constant METIS_INPUT_FILE : ./weighted_graph.gr ; +path-constant WEIGHTED_MATCHING_INPUT_FILE : ./weighted_matching.dat ; + project : requirements /boost/graph//boost_graph ; alias graph_test_regular : @@ -118,7 +120,7 @@ alias graph_test_regular : [ run cuthill_mckee_ordering.cpp ] [ run king_ordering.cpp ] [ run matching_test.cpp ] - [ run weighted_matching_test.cpp ] + [ run weighted_matching_test.cpp : $(WEIGHTED_MATCHING_INPUT_FILE) ] [ run weighted_matching_test2.cpp ] [ run max_flow_test.cpp ] [ run boykov_kolmogorov_max_flow_test.cpp ] diff --git a/test/weighted_matching_test.cpp b/test/weighted_matching_test.cpp index 30042c55..57b1f804 100644 --- a/test/weighted_matching_test.cpp +++ b/test/weighted_matching_test.cpp @@ -136,9 +136,12 @@ Graph make_graph(typename graph_traits< Graph >::vertices_size_type num_v, return g; } -int main(int, char*[]) +int main(int argc, char* argv[]) { - std::ifstream in_file("weighted_matching.dat"); + const char* filename = "weighted_matching.dat"; + if (argc > 1) + filename = argv[1]; + std::ifstream in_file(filename); BOOST_TEST(in_file.good()); std::string line; while (std::getline(in_file, line))