Browse Source

Specifing concrete test when filling testsuite

cl-refactor
winsvega 10 years ago
parent
commit
0a84827669
  1. 6
      test/TestHelper.cpp
  2. 2
      test/TestHelper.h
  3. 4
      test/libethereum/state.cpp

6
test/TestHelper.cpp

@ -741,6 +741,12 @@ Options::Options()
inputLimits = true; inputLimits = true;
bigData = true; bigData = true;
} }
else if (arg.compare(0, 12, "--singletest") == 0)
{
singletest = true;
if (arg.size() > 12)
singletestName = arg.substr(13); // skip '=' char
}
} }
} }

2
test/TestHelper.h

@ -188,6 +188,8 @@ public:
/// Test selection /// Test selection
/// @{ /// @{
bool singletest = false;
std::string singletestName;
bool performance = false; bool performance = false;
bool quadratic = false; bool quadratic = false;
bool memory = false; bool memory = false;

4
test/libethereum/state.cpp

@ -43,6 +43,10 @@ void doStateTests(json_spirit::mValue& v, bool _fillin)
{ {
for (auto& i: v.get_obj()) for (auto& i: v.get_obj())
{ {
if (test::Options::get().singletest == true)
if (test::Options::get().singletestName != i.first)
continue;
std::cout << " " << i.first << "\n"; std::cout << " " << i.first << "\n";
mObject& o = i.second.get_obj(); mObject& o = i.second.get_obj();

Loading…
Cancel
Save