Merge pull request #6696 from ethereum/sol-yul-while

Fix wrong test settings
This commit is contained in:
chriseth 2019-05-08 12:48:57 +02:00 committed by GitHub
commit ed450a31a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -66,6 +66,7 @@ string TestCase::parseSourceAndSettings(istream& _stream)
{
string source;
string line;
static string const comment("// ");
static string const settingsDelimiter("// ====");
static string const delimiter("// ----");
bool sourcePart = true;
@ -77,12 +78,12 @@ string TestCase::parseSourceAndSettings(istream& _stream)
sourcePart = false;
else if (sourcePart)
source += line + "\n";
else if (boost::algorithm::starts_with(line, "// "))
else if (boost::algorithm::starts_with(line, comment))
{
size_t colon = line.find(':');
if (colon == string::npos)
throw runtime_error(string("Expected \":\" inside setting."));
string key = line.substr(3, colon - 3);
string key = line.substr(comment.size(), colon - comment.size());
string value = line.substr(colon + 1);
boost::algorithm::trim(key);
boost::algorithm::trim(value);

View File

@ -16,7 +16,7 @@ contract C {
function t(uint) public pure {
}
}
// ===
// ====
// compileViaYul: true
// ----
// f() -> 0

View File

@ -23,7 +23,7 @@ contract C is X {
x = 3;
}
}
// ===
// ====
// compileViaYul: true
// ----
// f() -> 3