mirror of https://github.com/tc39/test262.git
Lint: Rename _THROW_STMT_LEGACY to _THROW_STMT_RAW.
'Legacy' implies (to me) that it should no longer be allowed, but the lint explicitly checks for its presence (in the 'raw' case).
This commit is contained in:
parent
8946956f19
commit
b78cb852e6
|
@ -5,7 +5,7 @@ _THROW_STMT = re.compile(
|
|||
r'^\$DONOTEVALUATE\(\);$',
|
||||
re.MULTILINE)
|
||||
|
||||
_THROW_STMT_LEGACY = re.compile(
|
||||
_THROW_STMT_RAW = re.compile(
|
||||
r'^throw "Test262: This statement should not be evaluated\.";$',
|
||||
re.MULTILINE)
|
||||
|
||||
|
@ -32,7 +32,7 @@ class CheckNegative(Check):
|
|||
|
||||
if negative["phase"] in ["parse", "resolution"]:
|
||||
if meta.get('flags') and 'raw' in meta['flags']:
|
||||
if not _THROW_STMT_LEGACY.search(source):
|
||||
if not _THROW_STMT_RAW.search(source):
|
||||
return 'Negative tests of type "early" must include a `throw` statement'
|
||||
elif not _THROW_STMT.search(source):
|
||||
return 'Negative tests of type "early" must include a $DONOTEVALUATE() call'
|
||||
|
|
Loading…
Reference in New Issue