diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-05-25 11:51:46 -0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-05-25 11:51:46 -0400 |
commit | b9a3229520530cc382542456d2bd07d8707c5998 (patch) | |
tree | a1b753ef5a1089501b4f3d92f0b2d6da2c1ca53c /dpmert | |
parent | a0b6d78b597b8620e934e02092ce0b9c20204d8f (diff) |
Fix path to test_data
Diffstat (limited to 'dpmert')
-rw-r--r-- | dpmert/lo_test.cc | 6 |
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); |