mirror of https://github.com/tc39/test262.git
Add tests for parsing behavior
Test262 already includes tests to ensure the correct runtime semantics for these forms. Add equivalent tests designed to verify that the equivalent parsing behavior is also observed.
This commit is contained in:
parent
cd2ffd2233
commit
e95c75b6ae
|
@ -0,0 +1,21 @@
|
|||
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 10.1.1-15-s
|
||||
description: >
|
||||
Strict Mode - Function code that is part of a FunctionDeclaration
|
||||
is strict function code if FunctionDeclaration is contained in use
|
||||
strict
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
"use strict";
|
||||
function fun() {
|
||||
var static;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 10.1.1-2-s
|
||||
description: >
|
||||
Strict Mode - Use Strict Directive Prologue is ''use strict''
|
||||
which lost the last character ';'
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
function fun() {
|
||||
"use strict"
|
||||
var static;
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 10.1.1-19-s
|
||||
description: >
|
||||
Strict Mode - Function code of a FunctionDeclaration contains Use
|
||||
Strict Directive which appears at the start of the block
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
function fun() {
|
||||
"use strict";
|
||||
var static;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 10.1.1-16-s
|
||||
description: >
|
||||
Strict Mode - Function code that is part of a FunctionExpression
|
||||
is strict function code if FunctionExpression is contained in use
|
||||
strict
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
"use strict";
|
||||
var static;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 10.1.1-2-s
|
||||
description: >
|
||||
Strict Mode - Use Strict Directive Prologue is ''use strict''
|
||||
which lost the last character ';'
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
(function() {
|
||||
"use strict"
|
||||
|
||||
var static;
|
||||
});
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 10.1.1-22-s
|
||||
description: >
|
||||
Strict Mode - Function code of a FunctionExpression contains Use
|
||||
Strict Directive which appears at the start of the block
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var static;
|
||||
});
|
Loading…
Reference in New Issue