mirror of
https://github.com/tc39/test262.git
synced 2025-09-25 02:57:53 +02:00
Remove onlyStrict flag and 'use strict' directive from tests which run in strict and non-strict mode
This commit is contained in:
parent
1cd8f45b27
commit
e3c64eeb6b
@ -4,14 +4,11 @@
|
||||
*/
|
||||
|
||||
/*---
|
||||
flags:
|
||||
- onlyStrict
|
||||
includes: [deepEqual.js]
|
||||
description: |
|
||||
pending
|
||||
esid: pending
|
||||
---*/
|
||||
"use strict";
|
||||
|
||||
const x = Object.freeze([1, 2, 3]);
|
||||
|
||||
@ -44,4 +41,3 @@ assert.deepEqual(x.concat(array), [1, 2, 3, [5, 4]]);
|
||||
// Explicitly spreadable
|
||||
array[Symbol.isConcatSpreadable] = true;
|
||||
assert.deepEqual(x.concat(array), [1, 2, 3, 5, 4]);
|
||||
|
||||
|
@ -4,14 +4,11 @@
|
||||
*/
|
||||
|
||||
/*---
|
||||
flags:
|
||||
- onlyStrict
|
||||
includes: [compareArray.js]
|
||||
description: |
|
||||
pending
|
||||
esid: pending
|
||||
---*/
|
||||
"use strict";
|
||||
|
||||
// Primitive values should never be tried to spread
|
||||
let primitives = [
|
||||
@ -41,4 +38,3 @@ for (let value of primitives) {
|
||||
|
||||
prototype.length;
|
||||
}
|
||||
|
||||
|
@ -2,13 +2,10 @@
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
flags:
|
||||
- onlyStrict
|
||||
description: |
|
||||
pending
|
||||
esid: pending
|
||||
---*/
|
||||
"use strict";
|
||||
|
||||
var target = {};
|
||||
Object.defineProperty(target, "test", {configurable: false, writable: true, value: 5});
|
||||
@ -23,4 +20,3 @@ var proxy = new Proxy(target, {
|
||||
assert.throws(TypeError, () => Object.defineProperty(proxy, "test", {writable: false}));
|
||||
|
||||
assert.throws(TypeError, () => Reflect.defineProperty(proxy, "test", {writable: false}));
|
||||
|
||||
|
@ -2,13 +2,10 @@
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
flags:
|
||||
- onlyStrict
|
||||
description: |
|
||||
pending
|
||||
esid: pending
|
||||
---*/
|
||||
"use strict";
|
||||
|
||||
var target = { test: true };
|
||||
Object.preventExtensions(target);
|
||||
@ -24,4 +21,3 @@ assert.sameValue(Reflect.deleteProperty(proxy, "missing"), true);
|
||||
|
||||
assert.throws(TypeError, () => { delete proxy.test; });
|
||||
assert.throws(TypeError, () => Reflect.deleteProperty(proxy, "test"));
|
||||
|
||||
|
@ -2,13 +2,10 @@
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
flags:
|
||||
- onlyStrict
|
||||
description: |
|
||||
pending
|
||||
esid: pending
|
||||
---*/
|
||||
"use strict";
|
||||
|
||||
var target = {};
|
||||
Object.defineProperty(target, "test",
|
||||
@ -24,4 +21,3 @@ var proxy = new Proxy(target, {
|
||||
assert.throws(TypeError, () => Object.getOwnPropertyDescriptor(proxy, "test"));
|
||||
|
||||
assert.throws(TypeError, () => Reflect.getOwnPropertyDescriptor(proxy, "test"));
|
||||
|
||||
|
@ -4,19 +4,10 @@
|
||||
*/
|
||||
|
||||
/*---
|
||||
flags:
|
||||
- onlyStrict
|
||||
description: |
|
||||
Don't assert assigning into memory detached while converting the value to assign into a number
|
||||
esid: pending
|
||||
---*/
|
||||
"use strict"; // make test fail when limitation below is fixed
|
||||
|
||||
// Technically per current spec the element-sets should throw in strict mode,
|
||||
// but we just silently do nothing for now, somewhat due to limitations of our
|
||||
// internal MOP (which can't easily say "try this special behavior, else fall
|
||||
// back on normal logic"), somewhat because it's consistent with current
|
||||
// behavior (as of this test's addition) for out-of-bounds sets.
|
||||
|
||||
var ab = new ArrayBuffer(64);
|
||||
var ta = new Uint32Array(ab);
|
||||
|
Loading…
x
Reference in New Issue
Block a user