mirror of https://github.com/tc39/test262.git
Remove duplicate tests (#2377)
* Remove duplicate test The behavior under test is verified by another file in Test262: test/language/expressions/compound-assignment/S11.13.2_A2.1_T3.3.js That version is preferable because it does not depend on `eval` and because it supports both strict and non-strict mode. * Remove overly-permissive test By asserting only the presence of an "own" property, this test can be satisfied from both strict mode code and non-strict mode code. The following test verifies the presence of the "own" property and the associated descriptor's values in strict mode: test/language/arguments-object/10.6-13-c-3-s.js That subsumes the semantics verified by this test, making it superfluous. Remove the test. * Remove overly-permissive test By asserting only the absence of a syntax error, this test can be satisfied from both strict mode code and non-strict mode code. The following test verifies the runtime behavior of accessing the property in strict mode code: test/language/arguments-object/10.6-13-c-1-s.js That subsumes the semantics verified by this test, making it superfluous. Remove the test. * Remove duplicate test The behavior under test is verified by another file in Test262: test/built-ins/Math/prop-desc.js That version is preferable because it follows the test suite's convention for testing property descriptors and because it supports both strict and non-strict mode. * Remove duplicate test The behavior under test is verified by two separate files: test/language/statements/function/line-terminator-non-strict.js test/language/statements/function/line-terminator-strict.js These files differ only in their usage of the `noStrict`/`onlyStrict` metadata. Because tests are intended to be interpreted in both modes by default, these can be expressed with a single file that does not limit the permissible modes.
This commit is contained in:
parent
83d9f750c9
commit
8953024f1a
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: Global object properties have attributes { DontEnum }
|
||||
es5id: 10.2.3_A2.2_T4
|
||||
description: Function execution context - Other Properties
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
function test() {
|
||||
//CHECK#1
|
||||
for (var x in this) {
|
||||
if (x === 'Math') {
|
||||
$ERROR("#1: 'Math' have attribute DontEnum");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
test();
|
|
@ -1,14 +0,0 @@
|
|||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 10.6-14-1-s
|
||||
description: Strict Mode - 'callee' exists under strict mode
|
||||
flags: [onlyStrict]
|
||||
---*/
|
||||
|
||||
var argObj = function () {
|
||||
return arguments;
|
||||
} ();
|
||||
|
||||
assert(argObj.hasOwnProperty("callee"), 'argObj.hasOwnProperty("callee") !== true');
|
|
@ -1,14 +0,0 @@
|
|||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 10.6-1gs
|
||||
description: >
|
||||
Strict Mode - arguments.callee cannot be accessed in a strict
|
||||
function, but does not throw an early error
|
||||
flags: [onlyStrict]
|
||||
---*/
|
||||
|
||||
function f_10_6_1_gs(){
|
||||
return arguments.callee;
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 11.13.2-3-s
|
||||
description: >
|
||||
Strict Mode - ReferenceError is thrown if the
|
||||
LeftHandSideExpression of a Compound Assignment operator(%=)
|
||||
evaluates to an unresolvable reference
|
||||
flags: [onlyStrict]
|
||||
---*/
|
||||
|
||||
|
||||
assert.throws(ReferenceError, function() {
|
||||
eval("_11_13_2_3 %= 1;");
|
||||
});
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 11.13.2-7-s
|
||||
description: >
|
||||
Strict Mode - ReferenceError is thrown if the
|
||||
LeftHandSideExpression of a Compound Assignment operator(>>=)
|
||||
evaluates to an unresolvable reference
|
||||
flags: [onlyStrict]
|
||||
---*/
|
||||
|
||||
|
||||
assert.throws(ReferenceError, function() {
|
||||
eval("_11_13_2_7 >>= 1;");
|
||||
});
|
|
@ -1,49 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: Any separators are admitted between declaration chunks
|
||||
es5id: 13_A16
|
||||
description: Inserting separators between declaration chunks
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
function
|
||||
x
|
||||
(
|
||||
)
|
||||
{
|
||||
}
|
||||
;
|
||||
|
||||
x();
|
||||
|
||||
function y ( ) {};
|
||||
|
||||
y();
|
||||
|
||||
function
|
||||
|
||||
z
|
||||
|
||||
(
|
||||
|
||||
)
|
||||
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
z();
|
||||
|
||||
// The following function expression is expressed with literal unicode
|
||||
// characters so that parsers may benefit from this test. The included code
|
||||
// points are as follows:
|
||||
//
|
||||
// "function\u0009\u2029w(\u000C)\u00A0{\u000D}"
|
||||
|
||||
function
w() {
}
|
||||
|
||||
w();
|
Loading…
Reference in New Issue