mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Prettify VM and State test outputs
This commit is contained in:
parent
31db4fbde8
commit
3782a33e50
@ -473,7 +473,7 @@ void executeTests(const string& _name, const string& _testPathAppendix, std::fun
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
cnote << "Testing ..." << _name;
|
std::cout << "TEST " << _name << ":\n";
|
||||||
json_spirit::mValue v;
|
json_spirit::mValue v;
|
||||||
string s = asString(dev::contents(testPath + "/" + _name + ".json"));
|
string s = asString(dev::contents(testPath + "/" + _name + ".json"));
|
||||||
BOOST_REQUIRE_MESSAGE(s.length() > 0, "Contents of " + testPath + "/" + _name + ".json is empty. Have you cloned the 'tests' repo branch develop and set ETHEREUM_TEST_PATH to its path?");
|
BOOST_REQUIRE_MESSAGE(s.length() > 0, "Contents of " + testPath + "/" + _name + ".json is empty. Have you cloned the 'tests' repo branch develop and set ETHEREUM_TEST_PATH to its path?");
|
||||||
|
@ -47,7 +47,7 @@ void doStateTests(json_spirit::mValue& v, bool _fillin)
|
|||||||
|
|
||||||
for (auto& i: v.get_obj())
|
for (auto& i: v.get_obj())
|
||||||
{
|
{
|
||||||
cerr << i.first << endl;
|
std::cout << " " << i.first << "\n";
|
||||||
mObject& o = i.second.get_obj();
|
mObject& o = i.second.get_obj();
|
||||||
|
|
||||||
BOOST_REQUIRE(o.count("env") > 0);
|
BOOST_REQUIRE(o.count("env") > 0);
|
||||||
@ -67,12 +67,12 @@ void doStateTests(json_spirit::mValue& v, bool _fillin)
|
|||||||
}
|
}
|
||||||
catch (Exception const& _e)
|
catch (Exception const& _e)
|
||||||
{
|
{
|
||||||
cnote << "state execution did throw an exception: " << diagnostic_information(_e);
|
cnote << "Exception:\n" << diagnostic_information(_e);
|
||||||
theState.commit();
|
theState.commit();
|
||||||
}
|
}
|
||||||
catch (std::exception const& _e)
|
catch (std::exception const& _e)
|
||||||
{
|
{
|
||||||
cnote << "state execution did throw an exception: " << _e.what();
|
cnote << "state execution exception: " << _e.what();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_fillin)
|
if (_fillin)
|
||||||
|
6
vm.cpp
6
vm.cpp
@ -316,7 +316,7 @@ void doVMTests(json_spirit::mValue& v, bool _fillin)
|
|||||||
|
|
||||||
for (auto& i: v.get_obj())
|
for (auto& i: v.get_obj())
|
||||||
{
|
{
|
||||||
cnote << i.first;
|
std::cout << " " << i.first << "\n";
|
||||||
mObject& o = i.second.get_obj();
|
mObject& o = i.second.get_obj();
|
||||||
|
|
||||||
BOOST_REQUIRE(o.count("env") > 0);
|
BOOST_REQUIRE(o.count("env") > 0);
|
||||||
@ -354,7 +354,7 @@ void doVMTests(json_spirit::mValue& v, bool _fillin)
|
|||||||
}
|
}
|
||||||
catch (VMException const&)
|
catch (VMException const&)
|
||||||
{
|
{
|
||||||
cnote << "Safe VM Exception";
|
std::cout << " Safe VM Exception\n";
|
||||||
vmExceptionOccured = true;
|
vmExceptionOccured = true;
|
||||||
}
|
}
|
||||||
catch (Exception const& _e)
|
catch (Exception const& _e)
|
||||||
@ -544,7 +544,7 @@ BOOST_AUTO_TEST_CASE(vmRandom)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
cnote << "Testing ..." << path.filename();
|
std::cout << "TEST " << path.filename() << "\n";
|
||||||
json_spirit::mValue v;
|
json_spirit::mValue v;
|
||||||
string s = asString(dev::contents(path.string()));
|
string s = asString(dev::contents(path.string()));
|
||||||
BOOST_REQUIRE_MESSAGE(s.length() > 0, "Content of " + path.string() + " is empty. Have you cloned the 'tests' repo branch develop and set ETHEREUM_TEST_PATH to its path?");
|
BOOST_REQUIRE_MESSAGE(s.length() > 0, "Content of " + path.string() + " is empty. Have you cloned the 'tests' repo branch develop and set ETHEREUM_TEST_PATH to its path?");
|
||||||
|
Loading…
Reference in New Issue
Block a user