mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #6696 from ethereum/sol-yul-while
Fix wrong test settings
This commit is contained in:
commit
ed450a31a3
@ -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);
|
||||
|
@ -16,7 +16,7 @@ contract C {
|
||||
function t(uint) public pure {
|
||||
}
|
||||
}
|
||||
// ===
|
||||
// ====
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// f() -> 0
|
||||
|
@ -23,7 +23,7 @@ contract C is X {
|
||||
x = 3;
|
||||
}
|
||||
}
|
||||
// ===
|
||||
// ====
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// f() -> 3
|
||||
|
Loading…
Reference in New Issue
Block a user