|
Boost-Commit : |
From: dgregor_at_[hidden]
Date: 2007-09-13 15:41:28
Author: dgregor
Date: 2007-09-13 15:41:27 EDT (Thu, 13 Sep 2007)
New Revision: 39246
URL: http://svn.boost.org/trac/boost/changeset/39246
Log:
Teach cycle_ratio_tests to find its input files during regression testing
Text files modified:
trunk/libs/graph/test/Jamfile.v2 | 2 +-
trunk/libs/graph/test/cycle_ratio_tests.cpp | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
Modified: trunk/libs/graph/test/Jamfile.v2
==============================================================================
--- trunk/libs/graph/test/Jamfile.v2 (original)
+++ trunk/libs/graph/test/Jamfile.v2 2007-09-13 15:41:27 EDT (Thu, 13 Sep 2007)
@@ -105,7 +105,7 @@
[ run kolmogorov_max_flow_test.cpp ]
- [ run cycle_ratio_tests.cpp ../build//boost_graph ]
+ [ run cycle_ratio_tests.cpp ../build//boost_graph : . ]
[ run basic_planarity_test.cpp ]
Modified: trunk/libs/graph/test/cycle_ratio_tests.cpp
==============================================================================
--- trunk/libs/graph/test/cycle_ratio_tests.cpp (original)
+++ trunk/libs/graph/test/cycle_ratio_tests.cpp 2007-09-13 15:41:27 EDT (Thu, 13 Sep 2007)
@@ -180,6 +180,9 @@
int test_main(int argc, char* argv[])
{
+ std::string input_directory = ".";
+ if (argc > 1) input_directory = argv[1];
+
const double epsilon = 0.00000001;
double min_cr, max_cr; ///Minimum and maximum cycle ratio
typedef std::vector<graph_traits<GraphInt>::edge_descriptor> ccInt_t;
@@ -236,7 +239,7 @@
std::cout << '\n';
tg.clear();
- /**/read_data("cycle_ratio_s382.90.dot", tg);
+ /**/read_data((input_directory + "/cycle_ratio_s382.90.dot").c_str(), tg);
min_cr = minimum_cycle_ratio(tg, vim, ew1m, ew2m, get(edge_index,tg), &cc, 2);
std::cout << "Minimum cycle ratio is " << min_cr << "\n";
BOOST_CHECK(std::abs(min_cr - 0.33333333333) < epsilon );
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk