aboutsummaryrefslogtreecommitdiffstats
path: root/trie.cpp
diff options
context:
space:
mode:
authorChristoph Jentzsch <jentzsch.software@gmail.com>2014-10-28 00:04:18 +0800
committerChristoph Jentzsch <jentzsch.software@gmail.com>2014-10-28 00:04:18 +0800
commitfb2157445522a857e05f8c4b9ee5d43755f92c14 (patch)
tree23678b1d1b076b2d146b3f84d47aca23144bc0c6 /trie.cpp
parentb69cc9815ff7b93e811f7fb5b0ef8b5164a1812a (diff)
downloaddexon-solidity-fb2157445522a857e05f8c4b9ee5d43755f92c14.tar.gz
dexon-solidity-fb2157445522a857e05f8c4b9ee5d43755f92c14.tar.zst
dexon-solidity-fb2157445522a857e05f8c4b9ee5d43755f92c14.zip
use ETHEREUM_TEST_PATH in all tests
Diffstat (limited to 'trie.cpp')
-rw-r--r--trie.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/trie.cpp b/trie.cpp
index 899eb1f6..f8ebd10c 100644
--- a/trie.cpp
+++ b/trie.cpp
@@ -49,9 +49,20 @@ static unsigned fac(unsigned _i)
BOOST_AUTO_TEST_CASE(trie_tests)
{
+ const char* ptestPath = getenv("ETHEREUM_TEST_PATH");
+ string testPath;
+
+ if (ptestPath == NULL)
+ {
+ cnote << " could not find environment variable ETHEREUM_TEST_PATH \n";
+ testPath = "../../../tests";
+ }
+ else
+ testPath = ptestPath;
+
cnote << "Testing Trie...";
js::mValue v;
- string s = asString(contents("../../../tests/trietest.json"));
+ string s = asString(contents(testPath + "/trietest.json"));
BOOST_REQUIRE_MESSAGE(s.length() > 0, "Contents of 'trietest.json' is empty. Have you cloned the 'tests' repo branch develop?");
js::read_string(s, v);
for (auto& i: v.get_obj())