MCPcopy Create free account
hub / github.com/LUX-Core/lux / loadJsonFromFile

Method loadJsonFromFile

src/cpp-ethereum/test/libtestutils/Common.cpp:58–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58Json::Value dev::test::loadJsonFromFile(std::string const& _path)
59{
60 Json::Reader reader;
61 Json::Value result;
62 string s = dev::contentsString(_path);
63 if (!s.length())
64 ctest << "Contents of " + _path + " is empty. Have you cloned the 'tests' repo branch develop and set ETHEREUM_TEST_PATH to its path?";
65 else
66 ctest << "FIXTURE: loaded test from file: " << _path;
67
68 reader.parse(s, result);
69 return result;
70}
71
72std::string dev::test::toTestFilePath(std::string const& _filename)
73{

Callers

nothing calls this directly

Calls 2

lengthMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected