Unify parsing of simple test expectations and require lines to start with `//`.

This commit is contained in:
Daniel Kirchner
2019-06-11 14:05:45 +02:00
parent bd1f65d609
commit 547173533c
5 changed files with 19 additions and 18 deletions
+1 -5
View File
@@ -55,11 +55,7 @@ ObjectCompilerTest::ObjectCompilerTest(string const& _filename)
m_optimize = true;
m_source += line + "\n";
}
while (getline(file, line))
if (boost::algorithm::starts_with(line, "//"))
m_expectation += line.substr((line.size() >= 3 && line[2] == ' ') ? 3 : 2) + "\n";
else
m_expectation += line + "\n";
m_expectation = parseSimpleExpectations(file);
}
TestCase::TestResult ObjectCompilerTest::run(ostream& _stream, string const& _linePrefix, bool const _formatted)