mirror of
https://github.com/tc39/test262.git
synced 2025-07-27 16:04:36 +02:00
commit
83d9f750c9
16
test/built-ins/Boolean/prop-desc.js
Normal file
16
test/built-ins/Boolean/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-constructor-properties-of-the-global-object-boolean
|
||||||
|
description: Property descriptor for Boolean
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "Boolean");
|
||||||
|
verifyWritable(this, "Boolean");
|
||||||
|
verifyConfigurable(this, "Boolean");
|
16
test/built-ins/Date/prop-desc.js
Normal file
16
test/built-ins/Date/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-constructor-properties-of-the-global-object-date
|
||||||
|
description: Property descriptor for Date
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "Date");
|
||||||
|
verifyWritable(this, "Date");
|
||||||
|
verifyConfigurable(this, "Date");
|
16
test/built-ins/Error/prop-desc.js
Normal file
16
test/built-ins/Error/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-constructor-properties-of-the-global-object-error
|
||||||
|
description: Property descriptor for Error
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "Error");
|
||||||
|
verifyWritable(this, "Error");
|
||||||
|
verifyConfigurable(this, "Error");
|
16
test/built-ins/Function/prop-desc.js
Normal file
16
test/built-ins/Function/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-constructor-properties-of-the-global-object-function
|
||||||
|
description: Property descriptor for Function
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "Function");
|
||||||
|
verifyWritable(this, "Function");
|
||||||
|
verifyConfigurable(this, "Function");
|
@ -1,15 +0,0 @@
|
|||||||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
|
||||||
|
|
||||||
/*---
|
|
||||||
info: The Infinity is ReadOnly
|
|
||||||
es5id: 15.1.1.2_A2_T1
|
|
||||||
description: Checking typeof Functions
|
|
||||||
includes: [propertyHelper.js]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
// CHECK#1
|
|
||||||
verifyNotWritable(this, "Infinity", null, true);
|
|
||||||
if (typeof(Infinity) === "boolean") {
|
|
||||||
$ERROR('#1: Infinity = true; typeof(Infinity) !== "boolean". Actual: ' + (typeof(Infinity)));
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
|
||||||
|
|
||||||
/*---
|
|
||||||
info: The Infinity is DontDelete
|
|
||||||
es5id: 15.1.1.2_A3_T1
|
|
||||||
description: Use delete
|
|
||||||
includes: [propertyHelper.js]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
// CHECK#1
|
|
||||||
verifyNotConfigurable(this, "Infinity");
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (delete this.Infinity !== false) {
|
|
||||||
$ERROR('#1: delete Infinity === false.');
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
if (e instanceof Test262Error) throw e;
|
|
||||||
assert(e instanceof TypeError);
|
|
||||||
}
|
|
17
test/built-ins/Infinity/prop-desc.js
Normal file
17
test/built-ins/Infinity/prop-desc.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-value-properties-of-the-global-object-infinity
|
||||||
|
description: Property descriptor of Infinity
|
||||||
|
info: |
|
||||||
|
This property has the attributes { [[Writable]]: false, [[Enumerable]]:
|
||||||
|
false, [[Configurable]]: false }.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyProperty(this, "Infinity", {
|
||||||
|
enumerable: false,
|
||||||
|
writable: false,
|
||||||
|
configurable: false
|
||||||
|
});
|
@ -16,7 +16,6 @@ info: |
|
|||||||
i. Let funcResult be Call(callbackfn, T, «e.[[value]], e.[[key]], M»).
|
i. Let funcResult be Call(callbackfn, T, «e.[[value]], e.[[key]], M»).
|
||||||
ii. ReturnIfAbrupt(funcResult).
|
ii. ReturnIfAbrupt(funcResult).
|
||||||
...
|
...
|
||||||
flags: [noStrict]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var map = new Map([[0, 0]]);
|
var map = new Map([[0, 0]]);
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
// Copyright (C) 2015 André Bargull. All rights reserved.
|
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
|
||||||
|
|
||||||
/*---
|
|
||||||
info: The NaN is ReadOnly
|
|
||||||
es5id: 15.1.1.1_A2_T1
|
|
||||||
description: Checking typeof Functions
|
|
||||||
includes: [propertyHelper.js]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
// CHECK#1
|
|
||||||
verifyNotWritable(this, "NaN", null, true);
|
|
||||||
if (typeof(NaN) === "boolean") {
|
|
||||||
$ERROR('#1: NaN = true; typeof(NaN) !== "boolean". Actual: ' + (typeof(NaN)));
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
|
||||||
|
|
||||||
/*---
|
|
||||||
info: The NaN is DontDelete
|
|
||||||
es5id: 15.1.1.2_A3_T1
|
|
||||||
description: Use delete
|
|
||||||
includes: [propertyHelper.js]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
// CHECK#1
|
|
||||||
verifyNotConfigurable(this, "NaN");
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (delete this.NaN !== false) {
|
|
||||||
$ERROR('#1: delete NaN === false.');
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
if (e instanceof Test262Error) throw e;
|
|
||||||
assert(e instanceof TypeError);
|
|
||||||
}
|
|
17
test/built-ins/NaN/prop-desc.js
Normal file
17
test/built-ins/NaN/prop-desc.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-value-properties-of-the-global-object-nan
|
||||||
|
description: Property descriptor of NaN
|
||||||
|
info: |
|
||||||
|
This property has the attributes { [[Writable]]: false, [[Enumerable]]:
|
||||||
|
false, [[Configurable]]: false }.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyProperty(this, "NaN", {
|
||||||
|
enumerable: false,
|
||||||
|
writable: false,
|
||||||
|
configurable: false
|
||||||
|
});
|
16
test/built-ins/NativeErrors/EvalError/prop-desc.js
Normal file
16
test/built-ins/NativeErrors/EvalError/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-constructor-properties-of-the-global-object-evalerror
|
||||||
|
description: Property descriptor for EvalError
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "EvalError");
|
||||||
|
verifyWritable(this, "EvalError");
|
||||||
|
verifyConfigurable(this, "EvalError");
|
16
test/built-ins/NativeErrors/RangeError/prop-desc.js
Normal file
16
test/built-ins/NativeErrors/RangeError/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-constructor-properties-of-the-global-object-rangeerror
|
||||||
|
description: Property descriptor for RangeError
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "RangeError");
|
||||||
|
verifyWritable(this, "RangeError");
|
||||||
|
verifyConfigurable(this, "RangeError");
|
16
test/built-ins/NativeErrors/ReferenceError/prop-desc.js
Normal file
16
test/built-ins/NativeErrors/ReferenceError/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-constructor-properties-of-the-global-object-referenceerror
|
||||||
|
description: Property descriptor for ReferenceError
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "ReferenceError");
|
||||||
|
verifyWritable(this, "ReferenceError");
|
||||||
|
verifyConfigurable(this, "ReferenceError");
|
16
test/built-ins/NativeErrors/SyntaxError/prop-desc.js
Normal file
16
test/built-ins/NativeErrors/SyntaxError/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-constructor-properties-of-the-global-object-syntaxerror
|
||||||
|
description: Property descriptor for SyntaxError
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "SyntaxError");
|
||||||
|
verifyWritable(this, "SyntaxError");
|
||||||
|
verifyConfigurable(this, "SyntaxError");
|
16
test/built-ins/NativeErrors/TypeError/prop-desc.js
Normal file
16
test/built-ins/NativeErrors/TypeError/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-constructor-properties-of-the-global-object-typeerror
|
||||||
|
description: Property descriptor for TypeError
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "TypeError");
|
||||||
|
verifyWritable(this, "TypeError");
|
||||||
|
verifyConfigurable(this, "TypeError");
|
16
test/built-ins/NativeErrors/URIError/prop-desc.js
Normal file
16
test/built-ins/NativeErrors/URIError/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-constructor-properties-of-the-global-object-urierror
|
||||||
|
description: Property descriptor for URIError
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "URIError");
|
||||||
|
verifyWritable(this, "URIError");
|
||||||
|
verifyConfigurable(this, "URIError");
|
16
test/built-ins/Object/prop-desc.js
Normal file
16
test/built-ins/Object/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-constructor-properties-of-the-global-object-object
|
||||||
|
description: Property descriptor for Object
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "Object");
|
||||||
|
verifyWritable(this, "Object");
|
||||||
|
verifyConfigurable(this, "Object");
|
16
test/built-ins/RegExp/prop-desc.js
Normal file
16
test/built-ins/RegExp/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-constructor-properties-of-the-global-object-regexp
|
||||||
|
description: Property descriptor for RegExp
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "RegExp");
|
||||||
|
verifyWritable(this, "RegExp");
|
||||||
|
verifyConfigurable(this, "RegExp");
|
16
test/built-ins/String/prop-desc.js
Normal file
16
test/built-ins/String/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-constructor-properties-of-the-global-object-string
|
||||||
|
description: Property descriptor for String
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "String");
|
||||||
|
verifyWritable(this, "String");
|
||||||
|
verifyConfigurable(this, "String");
|
17
test/built-ins/decodeURI/prop-desc.js
Normal file
17
test/built-ins/decodeURI/prop-desc.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-decodeuri-encodeduri
|
||||||
|
description: >
|
||||||
|
Property descriptor for decodeURI
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "decodeURI");
|
||||||
|
verifyWritable(this, "decodeURI");
|
||||||
|
verifyConfigurable(this, "decodeURI");
|
16
test/built-ins/decodeURIComponent/prop-desc.js
Normal file
16
test/built-ins/decodeURIComponent/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-decodeuricomponent-encodeduricomponent
|
||||||
|
description: Property descriptor for decodeURIComponent
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "decodeURIComponent");
|
||||||
|
verifyWritable(this, "decodeURIComponent");
|
||||||
|
verifyConfigurable(this, "decodeURIComponent");
|
16
test/built-ins/encodeURI/prop-desc.js
Normal file
16
test/built-ins/encodeURI/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-encodeuri-uri
|
||||||
|
description: Property descriptor for encodeURI
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "encodeURI");
|
||||||
|
verifyWritable(this, "encodeURI");
|
||||||
|
verifyConfigurable(this, "encodeURI");
|
16
test/built-ins/encodeURIComponent/prop-desc.js
Normal file
16
test/built-ins/encodeURIComponent/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-encodeuricomponent-uricomponent
|
||||||
|
description: Property descriptor for encodeURIComponent
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "encodeURIComponent");
|
||||||
|
verifyWritable(this, "encodeURIComponent");
|
||||||
|
verifyConfigurable(this, "encodeURIComponent");
|
@ -1,25 +0,0 @@
|
|||||||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
|
||||||
|
|
||||||
/*---
|
|
||||||
info: The eval property has the attribute DontEnum
|
|
||||||
esid: sec-eval-x
|
|
||||||
description: Checking use propertyIsEnumerable, for-in
|
|
||||||
---*/
|
|
||||||
|
|
||||||
//CHECK#1
|
|
||||||
if (this.propertyIsEnumerable('eval') !== false) {
|
|
||||||
$ERROR('#1: this.propertyIsEnumerable(\'eval\') === false. Actual: ' + (this.propertyIsEnumerable('eval')));
|
|
||||||
}
|
|
||||||
|
|
||||||
//CHECK#2
|
|
||||||
var result = true;
|
|
||||||
for (var p in this) {
|
|
||||||
if (p === "eval") {
|
|
||||||
result = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result !== true) {
|
|
||||||
$ERROR('#2: result = true; for (p in this) { if (p === "eval") result = false; } result === true;');
|
|
||||||
}
|
|
16
test/built-ins/eval/prop-desc.js
Normal file
16
test/built-ins/eval/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-eval-x
|
||||||
|
description: Property descriptor for eval
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "eval");
|
||||||
|
verifyWritable(this, "eval");
|
||||||
|
verifyConfigurable(this, "eval");
|
@ -4,10 +4,8 @@
|
|||||||
/*---
|
/*---
|
||||||
es5id: 10.2.1.1.3-4-22-s
|
es5id: 10.2.1.1.3-4-22-s
|
||||||
description: >
|
description: >
|
||||||
Strict Mode - TypeError is not thrown when changing the value of
|
TypeError is not thrown when changing the value of the Constructor Properties
|
||||||
the Constructor Properties of the Global Object under strict mode
|
of the Global Object
|
||||||
(Object)
|
|
||||||
flags: [onlyStrict]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var objBak = Object;
|
var objBak = Object;
|
@ -4,10 +4,8 @@
|
|||||||
/*---
|
/*---
|
||||||
es5id: 10.2.1.1.3-4-27-s
|
es5id: 10.2.1.1.3-4-27-s
|
||||||
description: >
|
description: >
|
||||||
Strict Mode - TypeError is not thrown when changing the value of
|
TypeError is not thrown when changing the value of the Constructor Properties
|
||||||
the Constructor Properties of the Global Object under strict mode
|
of the Global Object (Number)
|
||||||
(Number)
|
|
||||||
flags: [onlyStrict]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var numBak = Number;
|
var numBak = Number;
|
@ -1,24 +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_T1
|
|
||||||
description: Function execution context - Value Properties
|
|
||||||
flags: [noStrict]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
function test() {
|
|
||||||
//CHECK#1
|
|
||||||
for (var x in this) {
|
|
||||||
if (x === 'NaN') {
|
|
||||||
$ERROR("#1: 'NaN' have attribute DontEnum");
|
|
||||||
} else if (x === 'Infinity') {
|
|
||||||
$ERROR("#1: 'Infinity' have attribute DontEnum");
|
|
||||||
} else if (x === 'undefined') {
|
|
||||||
$ERROR("#1: 'undefined' have attribute DontEnum");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
test();
|
|
@ -1,36 +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_T2
|
|
||||||
description: Function execution context - Function Properties
|
|
||||||
flags: [noStrict]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
function test() {
|
|
||||||
//CHECK#1
|
|
||||||
for (var x in this) {
|
|
||||||
if (x === 'eval') {
|
|
||||||
$ERROR("#1: 'eval' have attribute DontEnum");
|
|
||||||
} else if (x === 'parseInt') {
|
|
||||||
$ERROR("#1: 'parseInt' have attribute DontEnum");
|
|
||||||
} else if (x === 'parseFloat') {
|
|
||||||
$ERROR("#1: 'parseFloat' have attribute DontEnum");
|
|
||||||
} else if (x === 'isNaN') {
|
|
||||||
$ERROR("#1: 'isNaN' have attribute DontEnum");
|
|
||||||
} else if (x === 'isFinite') {
|
|
||||||
$ERROR("#1: 'isFinite' have attribute DontEnum");
|
|
||||||
} else if (x === 'decodeURI') {
|
|
||||||
$ERROR("#1: 'decodeURI' have attribute DontEnum");
|
|
||||||
} else if (x === 'decodeURIComponent') {
|
|
||||||
$ERROR("#1: 'decodeURIComponent' have attribute DontEnum");
|
|
||||||
} else if (x === 'encodeURI') {
|
|
||||||
$ERROR("#1: 'encodeURI' have attribute DontEnum");
|
|
||||||
} else if (x === 'encodeURIComponent') {
|
|
||||||
$ERROR("#1: 'encodeURIComponent' have attribute DontEnum");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
test();
|
|
@ -1,48 +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_T3
|
|
||||||
description: Function execution context - Constructor Properties
|
|
||||||
flags: [noStrict]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
function test() {
|
|
||||||
//CHECK#1
|
|
||||||
for (var x in this) {
|
|
||||||
if (x === 'Object') {
|
|
||||||
$ERROR("#1: 'property 'Object' have attribute DontEnum");
|
|
||||||
} else if (x === 'Function') {
|
|
||||||
$ERROR("#1: 'Function' have attribute DontEnum");
|
|
||||||
} else if (x === 'String') {
|
|
||||||
$ERROR("#1: 'String' have attribute DontEnum");
|
|
||||||
} else if (x === 'Number') {
|
|
||||||
$ERROR("#1: 'Number' have attribute DontEnum");
|
|
||||||
} else if (x === 'Array') {
|
|
||||||
$ERROR("#1: 'Array' have attribute DontEnum");
|
|
||||||
} else if (x === 'Boolean') {
|
|
||||||
$ERROR("#1: 'Boolean' have attribute DontEnum");
|
|
||||||
} else if (x === 'Date') {
|
|
||||||
$ERROR("#1: 'Date' have attribute DontEnum");
|
|
||||||
} else if (x === 'RegExp') {
|
|
||||||
$ERROR("#1: 'RegExp' have attribute DontEnum");
|
|
||||||
} else if (x === 'Error') {
|
|
||||||
$ERROR("#1: 'Error' have attribute DontEnum");
|
|
||||||
} else if (x === 'EvalError') {
|
|
||||||
$ERROR("#1: 'EvalError' have attribute DontEnum");
|
|
||||||
} else if (x === 'RangeError') {
|
|
||||||
$ERROR("#1: 'RangeError' have attribute DontEnum");
|
|
||||||
} else if (x === 'ReferenceError') {
|
|
||||||
$ERROR("#1: 'ReferenceError' have attribute DontEnum");
|
|
||||||
} else if (x === 'SyntaxError') {
|
|
||||||
$ERROR("#1: 'SyntaxError' have attribute DontEnum");
|
|
||||||
} else if (x === 'TypeError') {
|
|
||||||
$ERROR("#1: 'TypeError' have attribute DontEnum");
|
|
||||||
} else if (x === 'URIError') {
|
|
||||||
$ERROR("#1: 'URIError' have attribute DontEnum");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
test();
|
|
17
test/built-ins/parseFloat/prop-desc.js
Normal file
17
test/built-ins/parseFloat/prop-desc.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-parsefloat-string
|
||||||
|
description: >
|
||||||
|
Property descriptor for parseFloat
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "parseFloat");
|
||||||
|
verifyWritable(this, "parseFloat");
|
||||||
|
verifyConfigurable(this, "parseFloat");
|
16
test/built-ins/parseInt/prop-desc.js
Normal file
16
test/built-ins/parseInt/prop-desc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-parseint-string-radix
|
||||||
|
description: Property descriptor for parseInt
|
||||||
|
info: |
|
||||||
|
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||||
|
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||||
|
[[Configurable]]: true } unless otherwise specified.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(this, "parseInt");
|
||||||
|
verifyWritable(this, "parseInt");
|
||||||
|
verifyConfigurable(this, "parseInt");
|
@ -1,21 +0,0 @@
|
|||||||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
|
||||||
|
|
||||||
/*---
|
|
||||||
info: The undefined is DontDelete
|
|
||||||
esid: sec-undefined
|
|
||||||
description: Use delete
|
|
||||||
includes: [propertyHelper.js]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
// CHECK#1
|
|
||||||
verifyNotConfigurable(this, "undefined");
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (delete this.undefined !== false) {
|
|
||||||
$ERROR('#1: delete undefined === false.');
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
if (e instanceof Test262Error) throw e;
|
|
||||||
assert(e instanceof TypeError);
|
|
||||||
}
|
|
17
test/built-ins/undefined/prop-desc.js
Normal file
17
test/built-ins/undefined/prop-desc.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Copyright (C) 2019 Bocoup. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-undefined
|
||||||
|
description: Property descriptor of undefined
|
||||||
|
info: |
|
||||||
|
This property has the attributes { [[Writable]]: false, [[Enumerable]]:
|
||||||
|
false, [[Configurable]]: false }.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyProperty(this, "undefined", {
|
||||||
|
enumerable: false,
|
||||||
|
writable: false,
|
||||||
|
configurable: false
|
||||||
|
});
|
@ -3,12 +3,11 @@
|
|||||||
/*---
|
/*---
|
||||||
es6id: 13.1
|
es6id: 13.1
|
||||||
description: >
|
description: >
|
||||||
function declarations in statement position in strict mode:
|
function declarations in statement position:
|
||||||
do Statement while ( Expression )
|
do Statement while ( Expression )
|
||||||
negative:
|
negative:
|
||||||
phase: parse
|
phase: parse
|
||||||
type: SyntaxError
|
type: SyntaxError
|
||||||
flags: [onlyStrict]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
$DONOTEVALUATE();
|
$DONOTEVALUATE();
|
||||||
|
@ -3,12 +3,11 @@
|
|||||||
/*---
|
/*---
|
||||||
es6id: 13.1
|
es6id: 13.1
|
||||||
description: >
|
description: >
|
||||||
function declarations in statement position in strict mode:
|
function declarations in statement position:
|
||||||
for ( ;;) Statement
|
for ( ;;) Statement
|
||||||
negative:
|
negative:
|
||||||
phase: parse
|
phase: parse
|
||||||
type: SyntaxError
|
type: SyntaxError
|
||||||
flags: [onlyStrict]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
$DONOTEVALUATE();
|
$DONOTEVALUATE();
|
||||||
|
@ -3,12 +3,11 @@
|
|||||||
/*---
|
/*---
|
||||||
es6id: 13.1
|
es6id: 13.1
|
||||||
description: >
|
description: >
|
||||||
function declarations in statement position in strict mode:
|
function declarations in statement position:
|
||||||
while ( Expression ) Statement
|
while ( Expression ) Statement
|
||||||
negative:
|
negative:
|
||||||
phase: parse
|
phase: parse
|
||||||
type: SyntaxError
|
type: SyntaxError
|
||||||
flags: [onlyStrict]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
$DONOTEVALUATE();
|
$DONOTEVALUATE();
|
||||||
|
@ -3,11 +3,9 @@
|
|||||||
|
|
||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
`yield` is a valid BindingIdentifier for GeneratorMethods outside of
|
`yield` is a valid BindingIdentifier for GeneratorMethods
|
||||||
strict mode.
|
|
||||||
features: [generators]
|
features: [generators]
|
||||||
es6id: 12.1.1
|
es6id: 12.1.1
|
||||||
flags: [noStrict]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var iter, result;
|
var iter, result;
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/*---
|
/*---
|
||||||
es5id: 11.3.1-2-3-s
|
es5id: 11.3.1-2-3-s
|
||||||
description: >
|
description: >
|
||||||
Strict Mode - SyntaxError is not thrown if the identifier
|
SyntaxError is not thrown if the identifier 'arguments[...]' appears as a
|
||||||
'arguments[...]' appears as a PostfixExpression(arguments++)
|
PostfixExpression(arguments++)
|
||||||
flags: [onlyStrict]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
function testcase() {
|
@ -3,10 +3,7 @@
|
|||||||
|
|
||||||
/*---
|
/*---
|
||||||
es5id: 11.1.1-1gs
|
es5id: 11.1.1-1gs
|
||||||
description: Strict Mode - 'this' object at the global scope is not undefined
|
description: the 'this' object at the global scope is not undefined
|
||||||
flags: [onlyStrict]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
assert.notSameValue(this, undefined);
|
assert.notSameValue(this, undefined);
|
@ -7,7 +7,6 @@ info: |
|
|||||||
constructors, return the object
|
constructors, return the object
|
||||||
es5id: 11.1.1_A3.2
|
es5id: 11.1.1_A3.2
|
||||||
description: Create function. It have property, that returned "this"
|
description: Create function. It have property, that returned "this"
|
||||||
flags: [noStrict]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user