Skip to content
Snippets Groups Projects
Commit a1a4e2b1 authored by Rick Waldron's avatar Rick Waldron Committed by Leo Balter
Browse files

Corrections to sec-web-compat-evaldeclarationinstantiation and...

Corrections to sec-web-compat-evaldeclarationinstantiation and sec-web-compat-functiondeclarationinstantiation tests. Fixes gh-1364 (#1509)
parent 14931c92
No related branches found
No related tags found
No related merge requests found
Showing
with 364 additions and 48 deletions
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: AnnexB extension not honored in strict mode
es6id: B.3.3.2
esid: sec-web-compat-evaldeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Block statement
in eval code containing a function declaration
info: |
Block statement in eval code containing a function declaration
B.3.3.3 Changes to EvalDeclarationInstantiation
1. If strict is false, then
...
flags: [noStrict]
---*/
var err;
......
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-web-compat-evaldeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Block statement
in eval code containing a function declaration
info: |
B.3.3.3 Changes to EvalDeclarationInstantiation
1. If strict is false, then
...
flags: [onlyStrict]
---*/
var err;
eval('"use strict";{ function f() {} }');
try {
f;
} catch (exception) {
err = exception;
}
assert.sameValue(err.constructor, ReferenceError);
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-web-compat-evaldeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Block statement
in eval code containing a function declaration
info: |
B.3.3.3 Changes to EvalDeclarationInstantiation
1. If strict is false, then
...
flags: [noStrict]
---*/
var err;
eval('{ function f() {} }');
try {
f;
} catch (exception) {
err = exception;
}
assert.sameValue(err, undefined);
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: AnnexB extension not honored in strict mode
es6id: B.3.3.2
flags: [onlyStrict]
esid: sec-web-compat-evaldeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Block statement
in eval code containing a function declaration
info: |
Block statement in eval code containing a function declaration
B.3.3.3 Changes to EvalDeclarationInstantiation
1. If strict is false, then
...
flags: [onlyStrict]
---*/
var err;
......
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: AnnexB extension not honored in strict mode
es6id: B.3.3.3
esid: sec-web-compat-evaldeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Function declaration
in the `case` clause of a `switch` statement in eval code
info: |
Function declaration in the `case` clause of a `switch` statement in eval
code
B.3.3.3 Changes to EvalDeclarationInstantiation
1. If strict is false, then
...
flags: [noStrict]
---*/
var err;
......
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-web-compat-evaldeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Function declaration
in the `case` clause of a `switch` statement in eval code
info: |
B.3.3.3 Changes to EvalDeclarationInstantiation
1. If strict is false, then
...
flags: [onlyStrict]
---*/
var err;
eval('\
"use strict";\
switch (1) {\
case 1:\
function f() { }\
}\
');
try {
f;
} catch (exception) {
err = exception;
}
assert.sameValue(err.constructor, ReferenceError);
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-web-compat-evaldeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Function declaration
in the `case` clause of a `switch` statement in eval code
info: |
B.3.3.3 Changes to EvalDeclarationInstantiation
1. If strict is false, then
...
flags: [noStrict]
---*/
var err;
eval('\
switch (1) {\
case 1:\
function f() { }\
}\
');
try {
f;
} catch (exception) {
err = exception;
}
assert.sameValue(err, undefined);
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: AnnexB extension not honored in strict mode
es6id: B.3.3.3
flags: [onlyStrict]
esid: sec-web-compat-evaldeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Function declaration
in the `case` clause of a `switch` statement in eval code
info: |
Function declaration in the `case` clause of a `switch` statement in eval
code
B.3.3.3 Changes to EvalDeclarationInstantiation
1. If strict is false, then
...
flags: [onlyStrict]
---*/
var err;
......
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: AnnexB extension not honored in strict mode
es6id: B.3.3.3
esid: sec-web-compat-evaldeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Function declaration
in the `default` clause of a `switch` statement in eval code
info: |
Function declaration in the `default` clause of a `switch` statement in
eval code
B.3.3.3 Changes to EvalDeclarationInstantiation
1. If strict is false, then
...
flags: [noStrict]
---*/
var err;
......
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-web-compat-evaldeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Function declaration
in the `default` clause of a `switch` statement in eval code
info: |
B.3.3.3 Changes to EvalDeclarationInstantiation
1. If strict is false, then
...
flags: [onlyStrict]
---*/
var err;
eval('\
"use strict";\
switch (1) {\
default:\
function f() { }\
}\
');
try {
f;
} catch (exception) {
err = exception;
}
assert.sameValue(err.constructor, ReferenceError);
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-web-compat-evaldeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Function declaration
in the `default` clause of a `switch` statement in eval code
info: |
B.3.3.3 Changes to EvalDeclarationInstantiation
1. If strict is false, then
...
flags: [noStrict]
---*/
var err;
eval('\
switch (1) {\
default:\
function f() { }\
}\
');
try {
f;
} catch (exception) {
err = exception;
}
assert.sameValue(err, undefined);
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: AnnexB extension not honored in strict mode
es6id: B.3.3.3
flags: [onlyStrict]
esid: sec-web-compat-evaldeclarationinstantiation
description: >
AnnexB extension not honored in strict mode: Function declaration
in the `default` clause of a `switch` statement in eval code
info: |
Function declaration in the `default` clause of a `switch` statement in
eval code
B.3.3.3 Changes to EvalDeclarationInstantiation
1. If strict is false, then
...
flags: [onlyStrict]
---*/
var err;
......
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-web-compat-functiondeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Block statement
in function code containing a function declaration
info: |
B.3.3.1 Changes to FunctionDeclarationInstantiation
1. If strict is false, then
...
flags: [noStrict]
---*/
var err1, err2;
(function() {
try {
f;
} catch (exception) {
err1 = exception;
}
{
function f() { }
}
try {
f;
} catch (exception) {
err2 = exception;
}
}());
assert.sameValue(err1, undefined);
assert.sameValue(err2, undefined);
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: AnnexB extension not honored in strict mode
es6id: B.3.3.1
flags: [onlyStrict]
esid: sec-web-compat-functiondeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Block statement
in function code containing a function declaration
info: |
Block statement in function code containing a function declaration
B.3.3.1 Changes to FunctionDeclarationInstantiation
1. If strict is false, then
...
flags: [onlyStrict]
---*/
var err1, err2;
......
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-web-compat-functiondeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Function declaration
in the `case` clause of a `switch` statement in function code
info: |
B.3.3.1 Changes to FunctionDeclarationInstantiation
1. If strict is false, then
...
flags: [noStrict]
---*/
var err1, err2;
(function() {
try {
f;
} catch (exception) {
err1 = exception;
}
switch (1) {
case 1:
function f() { }
}
try {
f;
} catch (exception) {
err2 = exception;
}
}());
assert.sameValue(err1, undefined);
assert.sameValue(err2, undefined);
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: AnnexB extension not honored in strict mode
es6id: B.3.3.1
flags: [onlyStrict]
esid: sec-web-compat-functiondeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Function declaration
in the `case` clause of a `switch` statement in function code
info: |
Function declaration in the `case` clause of a `switch` statement in
function code
B.3.3.1 Changes to FunctionDeclarationInstantiation
1. If strict is false, then
...
flags: [onlyStrict]
---*/
var err1, err2;
......
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-web-compat-functiondeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Function declaration
in the `default` clause of a `switch` statement in function code
info: |
B.3.3.1 Changes to FunctionDeclarationInstantiation
1. If strict is false, then
...
flags: [noStrict]
---*/
var err1, err2;
(function() {
try {
f;
} catch (exception) {
err1 = exception;
}
switch (1) {
default:
function f() { }
}
try {
f;
} catch (exception) {
err2 = exception;
}
}());
assert.sameValue(err1, undefined);
assert.sameValue(err2, undefined);
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: AnnexB extension not honored in strict mode
es6id: B.3.3.1
flags: [onlyStrict]
esid: sec-web-compat-functiondeclarationinstantiation
description: >
AnnexB extension not honored in strict mode, Function declaration
in the `default` clause of a `switch` statement in function code
info: |
Function declaration in the `default` clause of a `switch` statement in
function code
B.3.3.1 Changes to FunctionDeclarationInstantiation
1. If strict is false, then
...
flags: [onlyStrict]
---*/
var err1, err2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment