mirror of https://github.com/tc39/test262.git
Remove redundant tests
These tests are syntactically equivalent to `test/language/statements/with/12.10.1-7-s.js` and may therefore be removed without degrading coverage. While `test/language/statements/with/12.10.1-9-s.js` differs slightly in the pattern used to enable strict mode, the relevant behavior of the "use strict" directive prologue is expressly tested via `test/language/directive-prologue/func-expr-inside-func-decl-parse.js`.
This commit is contained in:
parent
de567d3aa5
commit
255338141b
|
@ -1,15 +0,0 @@
|
|||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 12.10.1-15-s
|
||||
description: >
|
||||
Strict Mode - SyntaxError is thrown when the RHS of a dot property
|
||||
assignment utilizes WithStatement
|
||||
flags: [onlyStrict]
|
||||
---*/
|
||||
|
||||
|
||||
assert.throws(SyntaxError, function() {
|
||||
eval("var obj = {}; obj.get = function (a) { with(a){} }; ");
|
||||
});
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 12.10.1-16-s
|
||||
description: >
|
||||
Strict Mode - SyntaxError is thrown when the RHS of an object
|
||||
indexer assignment utilizes WithStatement
|
||||
flags: [onlyStrict]
|
||||
---*/
|
||||
|
||||
|
||||
assert.throws(SyntaxError, function() {
|
||||
eval("var obj = {}; obj['get'] = function (a) { with(a){} }; ");
|
||||
});
|
|
@ -1,21 +0,0 @@
|
|||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 12.10.1-9-s
|
||||
description: >
|
||||
with statement in strict mode throws SyntaxError (strict function
|
||||
expression)
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
|
||||
assert.throws(SyntaxError, function() {
|
||||
eval("\
|
||||
var f = function () {\
|
||||
\'use strict\';\
|
||||
var o = {}; \
|
||||
with (o) {}; \
|
||||
}\
|
||||
");
|
||||
});
|
Loading…
Reference in New Issue