diff options
author | CJentzsch <jentzsch.software@gmail.com> | 2015-04-21 04:48:53 +0800 |
---|---|---|
committer | CJentzsch <jentzsch.software@gmail.com> | 2015-04-21 04:48:53 +0800 |
commit | b2adcf3bf3a6326628b5413bddae2742073d8078 (patch) | |
tree | f02bbd0bc7841f0b37b9473a9dcacc41b542fe0f /TestHelper.cpp | |
parent | 71012a83e86dac3a899780219a78f18acd1708c5 (diff) | |
download | dexon-solidity-b2adcf3bf3a6326628b5413bddae2742073d8078.tar dexon-solidity-b2adcf3bf3a6326628b5413bddae2742073d8078.tar.gz dexon-solidity-b2adcf3bf3a6326628b5413bddae2742073d8078.tar.bz2 dexon-solidity-b2adcf3bf3a6326628b5413bddae2742073d8078.tar.lz dexon-solidity-b2adcf3bf3a6326628b5413bddae2742073d8078.tar.xz dexon-solidity-b2adcf3bf3a6326628b5413bddae2742073d8078.tar.zst dexon-solidity-b2adcf3bf3a6326628b5413bddae2742073d8078.zip |
Restructure test folders
Diffstat (limited to 'TestHelper.cpp')
-rw-r--r-- | TestHelper.cpp | 10 |
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))); |