Browse Source

build fix

cl-refactor
Christoph Jentzsch 10 years ago
parent
commit
f495a58848
  1. 4
      test/TestHelper.cpp
  2. 2
      test/TestHelper.h
  3. 2
      test/state.cpp
  4. 2
      test/vm.cpp

4
test/TestHelper.cpp

@ -309,7 +309,7 @@ void userDefinedTest(string testTypeFlag, std::function<void(json_spirit::mValue
{ {
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i) for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
{ {
string arg = boost::unit_test::framework::master_test_suite().argv[i]; string arg = boost::unit_test::framework::master_test_suite().argv[i];
if (arg == testTypeFlag) if (arg == testTypeFlag)
{ {
if (i + 1 >= boost::unit_test::framework::master_test_suite().argc) if (i + 1 >= boost::unit_test::framework::master_test_suite().argc)
@ -332,10 +332,12 @@ void userDefinedTest(string testTypeFlag, std::function<void(json_spirit::mValue
catch (Exception const& _e) catch (Exception const& _e)
{ {
BOOST_ERROR("Failed Test with Exception: " << diagnostic_information(_e)); BOOST_ERROR("Failed Test with Exception: " << diagnostic_information(_e));
g_logVerbosity = currentVerbosity;
} }
catch (std::exception const& _e) catch (std::exception const& _e)
{ {
BOOST_ERROR("Failed Test with Exception: " << _e.what()); BOOST_ERROR("Failed Test with Exception: " << _e.what());
g_logVerbosity = currentVerbosity;
} }
g_logVerbosity = currentVerbosity; g_logVerbosity = currentVerbosity;
} }

2
test/TestHelper.h

@ -71,7 +71,7 @@ void checkOutput(bytes const& _output, json_spirit::mObject& _o);
void checkStorage(std::map<u256, u256> _expectedStore, std::map<u256, u256> _resultStore, Address _expectedAddr); void checkStorage(std::map<u256, u256> _expectedStore, std::map<u256, u256> _resultStore, Address _expectedAddr);
void executeTests(const std::string& _name, const std::string& _testPathAppendix, std::function<void(json_spirit::mValue&, bool)> doTests); void executeTests(const std::string& _name, const std::string& _testPathAppendix, std::function<void(json_spirit::mValue&, bool)> doTests);
std::string getTestPath(); std::string getTestPath();
void userDefinedTest(string testTypeFlag, std::function<void(json_spirit::mValue&, bool)> doTests); void userDefinedTest(std::string testTypeFlag, std::function<void(json_spirit::mValue&, bool)> doTests);
template<typename mapType> template<typename mapType>
void checkAddresses(mapType& _expectedAddrs, mapType& _resultAddrs) void checkAddresses(mapType& _expectedAddrs, mapType& _resultAddrs)

2
test/state.cpp

@ -124,7 +124,7 @@ BOOST_AUTO_TEST_CASE(stPreCompiledContracts)
BOOST_AUTO_TEST_CASE(userDefinedFileState) BOOST_AUTO_TEST_CASE(userDefinedFileState)
{ {
userDefinedTest("--statetest", dev::test::doStateTests); dev::test::userDefinedTest("--statetest", dev::test::doStateTests);
} }
BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END()

2
test/vm.cpp

@ -459,7 +459,7 @@ BOOST_AUTO_TEST_CASE(vmRandom)
BOOST_AUTO_TEST_CASE(userDefinedFileVM) BOOST_AUTO_TEST_CASE(userDefinedFileVM)
{ {
userDefinedTest("--vmtest", dev::test::doVMTests); dev::test::userDefinedTest("--vmtest", dev::test::doVMTests);
} }
BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END()

Loading…
Cancel
Save