Introduced TestCaseReader.

This commit is contained in:
a3d4
2020-03-16 23:14:33 +01:00
parent e5a49e2556
commit 66783c30ce
24 changed files with 348 additions and 346 deletions
+4 -10
View File
@@ -48,17 +48,11 @@ using namespace solidity::frontend::test;
using namespace std;
EwasmTranslationTest::EwasmTranslationTest(string const& _filename)
EwasmTranslationTest::EwasmTranslationTest(string const& _filename):
EVMVersionRestrictedTestCase(_filename)
{
boost::filesystem::path path(_filename);
ifstream file(_filename);
if (!file)
BOOST_THROW_EXCEPTION(runtime_error("Cannot open test case: \"" + _filename + "\"."));
file.exceptions(ios::badbit);
m_source = parseSourceAndSettings(file);
m_expectation = parseSimpleExpectations(file);
m_source = m_reader.source();
m_expectation = m_reader.simpleExpectations();
}
TestCase::TestResult EwasmTranslationTest::run(ostream& _stream, string const& _linePrefix, bool const _formatted)