summaryrefslogtreecommitdiff
path: root/dpmert
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-05-25 11:51:46 -0400
committerKenneth Heafield <github@kheafield.com>2012-05-25 11:51:46 -0400
commit7cadcdc7ce1e3441cf1ede4058bc2dbab563f44c (patch)
tree88b64619f313e4496db55af6cc4c2e2351517f60 /dpmert
parent0e3e275cd40f37274045d0c7967ca18de9339152 (diff)
Fix path to test_data
Diffstat (limited to 'dpmert')
-rw-r--r--dpmert/lo_test.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/dpmert/lo_test.cc b/dpmert/lo_test.cc
index f6df523e..2daf87bb 100644
--- a/dpmert/lo_test.cc
+++ b/dpmert/lo_test.cc
@@ -118,13 +118,15 @@ BOOST_AUTO_TEST_CASE( TestS1) {
to_optimize.push_back(fPhraseModel_1);
to_optimize.push_back(fPhraseModel_2);
+ std::string path(boost::unit_test::framework::master_test_suite().argc == 2 ? boost::unit_test::framework::master_test_suite().argv[1] : "test_data");
+
Hypergraph hg;
- ReadFile rf("./test_data/0.json.gz");
+ ReadFile rf(path + "/0.json.gz");
HypergraphIO::ReadFromJSON(rf.stream(), &hg);
hg.Reweight(wts);
Hypergraph hg2;
- ReadFile rf2("./test_data/1.json.gz");
+ ReadFile rf2(path + "/1.json.gz");
HypergraphIO::ReadFromJSON(rf2.stream(), &hg2);
hg2.Reweight(wts);