mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Whiskers: Support conditional value parameters for lists
This commit is contained in:
@@ -189,11 +189,13 @@ string Whiskers::replace(
|
||||
if (conditionName[0] == '+')
|
||||
{
|
||||
string tag = conditionName.substr(1);
|
||||
assertThrow(
|
||||
_parameters.count(tag),
|
||||
WhiskersError, "Tag " + tag + " used as condition but was not set."
|
||||
);
|
||||
conditionValue = !_parameters.at(tag).empty();
|
||||
|
||||
if (_parameters.count(tag))
|
||||
conditionValue = !_parameters.at(tag).empty();
|
||||
else if (_listParameters.count(tag))
|
||||
conditionValue = !_listParameters.at(tag).empty();
|
||||
else
|
||||
assertThrow(false, WhiskersError, "Tag " + tag + " used as condition but was not set.");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user