From b2adcf3bf3a6326628b5413bddae2742073d8078 Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Mon, 20 Apr 2015 22:48:53 +0200 Subject: Restructure test folders --- TestHelper.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'TestHelper.cpp') diff --git a/TestHelper.cpp b/TestHelper.cpp index ed844e96..3d085682 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -23,9 +23,6 @@ #include #include - -#include - #include #include #include @@ -592,7 +589,7 @@ void userDefinedTest(string testTypeFlag, std::function doTests) +void executeTests(const string& _name, const string& _testPathAppendix, const boost::filesystem::path _pathToFiller, std::function doTests) { string testPath = getTestPath(); testPath += _testPathAppendix; @@ -605,11 +602,12 @@ void executeTests(const string& _name, const string& _testPathAppendix, std::fun try { cnote << "Populating tests..."; + cout << "boost::filesystem::current_path(): " << boost::filesystem::current_path().string() << endl; json_spirit::mValue v; boost::filesystem::path p(__FILE__); boost::filesystem::path dir = p.parent_path(); - string s = asString(dev::contents(dir.string() + "/" + _name + "Filler.json")); - BOOST_REQUIRE_MESSAGE(s.length() > 0, "Contents of " + dir.string() + "/" + _name + "Filler.json is empty."); + string s = asString(dev::contents(_pathToFiller.string() + "/" + _name + "Filler.json")); + BOOST_REQUIRE_MESSAGE(s.length() > 0, "Contents of " + _pathToFiller.string() + "/" + _name + "Filler.json is empty."); json_spirit::read_string(s, v); doTests(v, true); writeFile(testPath + "/" + _name + ".json", asBytes(json_spirit::write_string(v, true))); -- cgit v1.2.3 From 8f8eb359741efe6cba7d27c9f55212492987afac Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Mon, 20 Apr 2015 23:17:19 +0200 Subject: fixes --- TestHelper.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'TestHelper.cpp') diff --git a/TestHelper.cpp b/TestHelper.cpp index 3d085682..1419afde 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -602,10 +602,8 @@ void executeTests(const string& _name, const string& _testPathAppendix, const bo try { cnote << "Populating tests..."; - cout << "boost::filesystem::current_path(): " << boost::filesystem::current_path().string() << endl; json_spirit::mValue v; boost::filesystem::path p(__FILE__); - boost::filesystem::path dir = p.parent_path(); string s = asString(dev::contents(_pathToFiller.string() + "/" + _name + "Filler.json")); BOOST_REQUIRE_MESSAGE(s.length() > 0, "Contents of " + _pathToFiller.string() + "/" + _name + "Filler.json is empty."); json_spirit::read_string(s, v); -- cgit v1.2.3