Normalize coverage for `var` declarations

Add tests to mirror similar tests which were authored previously.
This commit is contained in:
Mike Pennisi 2018-09-23 22:31:06 -04:00
parent b819c597ab
commit aac38cb368
6 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1,15 @@
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-variable-statement
description: arguments as local var identifier throws SyntaxError in strict mode
flags: [onlyStrict]
negative:
phase: parse
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
var arguments = 42, a;

View File

@ -0,0 +1,15 @@
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-variable-statement
description: arguments as local var identifier throws SyntaxError in strict mode
flags: [onlyStrict]
negative:
phase: parse
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
var a, arguments = 42, b;

View File

@ -0,0 +1,10 @@
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-variable-statement
description: arguments as local var identifier is allowed
flags: [noStrict]
---*/
var eval;

View File

@ -0,0 +1,15 @@
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-variable-statement
description: eval as local var identifier throws SyntaxError in strict mode
flags: [onlyStrict]
negative:
phase: parse
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
var a, eval = 42;

View File

@ -0,0 +1,15 @@
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-variable-statement
description: arguments as local var identifier throws SyntaxError in strict mode
flags: [onlyStrict]
negative:
phase: parse
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
var a, eval = 42, b;

View File

@ -0,0 +1,15 @@
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-variable-statement
description: arguments as local var identifier throws SyntaxError in strict mode
flags: [onlyStrict]
negative:
phase: parse
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
var a, eval, b;