Fix arg test
This commit is contained in:
parent
71adb0bbe7
commit
73db8d519b
1 changed files with 3 additions and 2 deletions
|
@ -53,9 +53,10 @@ class _IsArgument extends Matcher {
|
||||||
var arg = item is ArgumentContext ? item : parseArgument(item.toString());
|
var arg = item is ArgumentContext ? item : parseArgument(item.toString());
|
||||||
if (arg == null) return false;
|
if (arg == null) return false;
|
||||||
print(arg.span.highlight());
|
print(arg.span.highlight());
|
||||||
|
|
||||||
|
var v = arg.value;
|
||||||
return equals(name).matches(arg.name, matchState) &&
|
return equals(name).matches(arg.name, matchState) &&
|
||||||
((arg is VariableContext &&
|
((v is VariableContext && equals(value).matches(v.name, matchState)) ||
|
||||||
equals(value).matches(arg.name, matchState)) ||
|
|
||||||
equals(value).matches(arg.value.computeValue({}), matchState));
|
equals(value).matches(arg.value.computeValue({}), matchState));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue