aboutsummaryrefslogtreecommitdiffstats
path: root/TestHelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TestHelper.cpp')
-rw-r--r--TestHelper.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp
index ed844e96..3d085682 100644
--- a/TestHelper.cpp
+++ b/TestHelper.cpp
@@ -23,9 +23,6 @@
#include <thread>
#include <chrono>
-
-#include <boost/filesystem/path.hpp>
-
#include <libethereum/Client.h>
#include <liblll/Compiler.h>
#include <libevm/VMFactory.h>
@@ -592,7 +589,7 @@ void userDefinedTest(string testTypeFlag, std::function<void(json_spirit::mValue
}
}
-void executeTests(const string& _name, const string& _testPathAppendix, std::function<void(json_spirit::mValue&, bool)> doTests)
+void executeTests(const string& _name, const string& _testPathAppendix, const boost::filesystem::path _pathToFiller, std::function<void(json_spirit::mValue&, bool)> 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)));