MCPcopy Create free account
hub / github.com/argotorg/solidity / runTestCase

Function runTestCase

test/soltest.cpp:99–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97
98
99void runTestCase(TestCase::Config const& _config, TestCase::TestCaseCreator const& _testCaseCreator)
100{
101 try
102 {
103 std::stringstream errorStream;
104 auto testCase = _testCaseCreator(_config);
105 if (testCase->shouldRun())
106 switch (testCase->run(errorStream))
107 {
108 case TestCase::TestResult::Success:
109 break;
110 case TestCase::TestResult::Failure:
111 BOOST_ERROR("Test expectation mismatch.\n" + errorStream.str());
112 break;
113 case TestCase::TestResult::FatalError:
114 BOOST_ERROR("Fatal error during test.\n" + errorStream.str());
115 break;
116 }
117 }
118 catch (...)
119 {
120 BOOST_ERROR("Exception during extracted test: " << boost::current_exception_diagnostic_information());
121 }
122}
123
124int registerTests(
125 boost::unit_test::test_suite& _suite,

Callers 1

registerTestsFunction · 0.85

Calls 3

shouldRunMethod · 0.80
strMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected