mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 16:34:27 +02:00
Fix all test/harness/*.js tests (#1068)
$ test262-harness --hostType=d8 -t 4 --hostPath=`which d8` test/harness/*.js Ran 147 tests 147 passed 0 failed $ test262-harness --hostType=node -t 4 --hostPath=`which node` test/harness/*.js Ran 147 tests 147 passed 0 failed $ test262-harness --hostType=jsshell -t 4 --hostPath=`which js` test/harness/*.js Ran 147 tests 147 passed 0 failed Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
parent
0d2b3562e9
commit
1a2244faf8
@ -4,6 +4,7 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
`false` does not satisfy the assertion.
|
`false` does not satisfy the assertion.
|
||||||
|
includes: [sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
Two references to NaN do not satisfy the assertion.
|
Two references to NaN do not satisfy the assertion.
|
||||||
|
includes: [sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
An object literal does not satisfy the assertion.
|
An object literal does not satisfy the assertion.
|
||||||
|
includes: [sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
Distinct objects do not satisfy the assertion.
|
Distinct objects do not satisfy the assertion.
|
||||||
|
includes: [sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
Positive and negative zero do not satisfy the assertion.
|
Positive and negative zero do not satisfy the assertion.
|
||||||
|
includes: [sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
@ -4,13 +4,8 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
The assertion fails when the code does not parse with an early error
|
The assertion fails when the code does not parse with an early error
|
||||||
|
includes: [sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// monkeypatch the API
|
|
||||||
$ERROR = function $ERROR(message) {
|
|
||||||
throw new Test262Error(message);
|
|
||||||
};
|
|
||||||
|
|
||||||
assert.throws(Test262Error, () => {
|
assert.throws(Test262Error, () => {
|
||||||
assert.throws.early(ReferenceError, 'x = 1');
|
assert.throws.early(ReferenceError, 'x = 1');
|
||||||
});
|
});
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
description: >
|
description: >
|
||||||
Functions that throw values whose constructor does not match the specified
|
Functions that throw values whose constructor does not match the specified
|
||||||
constructor do not satisfy the assertion.
|
constructor do not satisfy the assertion.
|
||||||
|
includes: [sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
description: >
|
description: >
|
||||||
Functions that throw instances of the specified native Error constructor
|
Functions that throw instances of the specified native Error constructor
|
||||||
satisfy the assertion.
|
satisfy the assertion.
|
||||||
|
includes: [sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.throws(Error, function() {
|
assert.throws(Error, function() {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
The assertion fails when invoked without arguments.
|
The assertion fails when invoked without arguments.
|
||||||
|
includes: [sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
Functions that do not throw errors do not satisfy the assertion.
|
Functions that do not throw errors do not satisfy the assertion.
|
||||||
|
includes: [sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
Fails if second arg is not a function
|
Fails if second arg is not a function
|
||||||
|
includes: [sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
Functions that throw the `null` value do not satisfy the assertion.
|
Functions that throw the `null` value do not satisfy the assertion.
|
||||||
|
includes: [sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
Functions that throw primitive values do not satisfy the assertion.
|
Functions that throw primitive values do not satisfy the assertion.
|
||||||
|
includes: [sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
The assertion fails when invoked with a single argument.
|
The assertion fails when invoked with a single argument.
|
||||||
|
includes: [sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
description: >
|
description: >
|
||||||
Only passes when the provided date is exactly the specified number of
|
Only passes when the provided date is exactly the specified number of
|
||||||
milliseconds from the Unix epoch
|
milliseconds from the Unix epoch
|
||||||
includes: [assertRelativeDateMs.js]
|
includes: [assertRelativeDateMs.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var thrown;
|
var thrown;
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
|
|
||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
The global `$ERROR` function throws an instance of the global `Test262`
|
The global `$ERROR` function throws an instance of the global `Test262Error`
|
||||||
function with the specified message.
|
function with the specified message.
|
||||||
|
includes: [sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -25,5 +25,5 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (threw === false) {
|
if (threw === false) {
|
||||||
throw new Error('Expected a Test262Error, but no error was thrown.');
|
$ERROR('Expected a Test262Error, but no error was thrown.');
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
description: >
|
description: >
|
||||||
Objects whose specified property is not configurable do not satisfy the
|
Objects whose specified property is not configurable do not satisfy the
|
||||||
assertion outside of strict mode.
|
assertion outside of strict mode.
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js,sta.js]
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -5,10 +5,9 @@
|
|||||||
description: >
|
description: >
|
||||||
Objects whose specified property is not configurable do not satisfy the
|
Objects whose specified property is not configurable do not satisfy the
|
||||||
assertion in strict mode.
|
assertion in strict mode.
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js,sta.js]
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.defineProperty(obj, 'a', {
|
Object.defineProperty(obj, 'a', {
|
||||||
|
@ -5,10 +5,9 @@
|
|||||||
description: |
|
description: |
|
||||||
Objects whose specified symbol property is not enumerable do not satisfy the
|
Objects whose specified symbol property is not enumerable do not satisfy the
|
||||||
assertion.
|
assertion.
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js,sta.js]
|
||||||
features: [Symbol]
|
features: [Symbol]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
var s = Symbol('1');
|
var s = Symbol('1');
|
||||||
@ -29,7 +28,5 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (threw === false) {
|
if (threw === false) {
|
||||||
throw new Test262Error(
|
$ERROR('Expected a Test262Error, but no error was thrown.');
|
||||||
'Expected a Test262Error, but no error was thrown for symbol key.'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
description: |
|
description: |
|
||||||
Objects whose specified string property is not enumerable do not satisfy the
|
Objects whose specified string property is not enumerable do not satisfy the
|
||||||
assertion.
|
assertion.
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.defineProperty(obj, 'a', {
|
Object.defineProperty(obj, 'a', {
|
||||||
@ -27,7 +26,5 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (threw === false) {
|
if (threw === false) {
|
||||||
throw new Test262Error(
|
$ERROR('Expected a Test262Error, but no error was thrown.');
|
||||||
'Expected a Test262Error, but no error was thrown for string key.'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
description: >
|
description: >
|
||||||
Objects whose specified property is configurable do not satisfy the
|
Objects whose specified property is configurable do not satisfy the
|
||||||
assertion.
|
assertion.
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.defineProperty(obj, 'a', {
|
Object.defineProperty(obj, 'a', {
|
||||||
|
@ -5,10 +5,9 @@
|
|||||||
description: >
|
description: >
|
||||||
Objects whose specified property is not configurable satisfy the assertion
|
Objects whose specified property is not configurable satisfy the assertion
|
||||||
in strict mode.
|
in strict mode.
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js,sta.js]
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.defineProperty(obj, 'a', {
|
Object.defineProperty(obj, 'a', {
|
||||||
configurable: false
|
configurable: false
|
||||||
|
@ -5,10 +5,9 @@
|
|||||||
description: |
|
description: |
|
||||||
Objects whose specified symbol property is enumerable do not satisfy the
|
Objects whose specified symbol property is enumerable do not satisfy the
|
||||||
assertion.
|
assertion.
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js,sta.js]
|
||||||
features: [Symbol]
|
features: [Symbol]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
var s = Symbol('1');
|
var s = Symbol('1');
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
description: |
|
description: |
|
||||||
Objects whose specified string property is enumerable do not satisfy the
|
Objects whose specified string property is enumerable do not satisfy the
|
||||||
assertion.
|
assertion.
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.defineProperty(obj, 'a', {
|
Object.defineProperty(obj, 'a', {
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
Objects whose specified property is writable do not satisfy the assertion.
|
Objects whose specified property is writable do not satisfy the assertion.
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.defineProperty(obj, 'a', {
|
Object.defineProperty(obj, 'a', {
|
||||||
|
@ -5,10 +5,9 @@
|
|||||||
description: >
|
description: >
|
||||||
Objects whose specified property is not writable do not satisfy the
|
Objects whose specified property is not writable do not satisfy the
|
||||||
assertion outside of strict mode.
|
assertion outside of strict mode.
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js,sta.js]
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.defineProperty(obj, 'a', {
|
Object.defineProperty(obj, 'a', {
|
||||||
|
@ -5,9 +5,10 @@
|
|||||||
description: >
|
description: >
|
||||||
Objects whose specified property is not writable do not satisfy the
|
Objects whose specified property is not writable do not satisfy the
|
||||||
assertion in strict mode.
|
assertion in strict mode.
|
||||||
includes: [propertyHelper.js]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
|
includes: [propertyHelper.js,sta.js]
|
||||||
|
flags: [onlyStrict]
|
||||||
|
---*/
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.defineProperty(obj, 'a', {
|
Object.defineProperty(obj, 'a', {
|
||||||
|
@ -6,7 +6,6 @@ description: >
|
|||||||
Objects whose specified property is writable satisfy the assertion.
|
Objects whose specified property is writable satisfy the assertion.
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var obj = {};
|
var obj = {};
|
||||||
|
|
||||||
Object.defineProperty(obj, 'a', {
|
Object.defineProperty(obj, 'a', {
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
description: >
|
description: >
|
||||||
Objects that are expected to be functions but do not define the correct
|
Objects that are expected to be functions but do not define the correct
|
||||||
[[Class]] internal property do not satisfy the assertion.
|
[[Class]] internal property do not satisfy the assertion.
|
||||||
includes: [testBuiltInObject.js]
|
includes: [testBuiltInObject.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
description: >
|
description: >
|
||||||
Functions whose `length` property does not match the expected value do not
|
Functions whose `length` property does not match the expected value do not
|
||||||
satisfy the assertion.
|
satisfy the assertion.
|
||||||
includes: [testBuiltInObject.js]
|
includes: [testBuiltInObject.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
description: >
|
description: >
|
||||||
Non-constructor functions that do not throw an when invoked via `new` do
|
Non-constructor functions that do not throw an when invoked via `new` do
|
||||||
not satisfy the assertion.
|
not satisfy the assertion.
|
||||||
includes: [testBuiltInObject.js]
|
includes: [testBuiltInObject.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
description: >
|
description: >
|
||||||
Non-constructor functions that do not throw a TypeError when invoked via
|
Non-constructor functions that do not throw a TypeError when invoked via
|
||||||
`new` do not satisfy the assertion.
|
`new` do not satisfy the assertion.
|
||||||
includes: [testBuiltInObject.js]
|
includes: [testBuiltInObject.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var fn = function() {
|
var fn = function() {
|
||||||
throw new Error();
|
throw new Error();
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
Objects that are not extensible do not satisfy the assertion.
|
Objects that are not extensible do not satisfy the assertion.
|
||||||
includes: [testBuiltInObject.js]
|
includes: [testBuiltInObject.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.preventExtensions(obj);
|
Object.preventExtensions(obj);
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
description: >
|
description: >
|
||||||
Objects that are not expected to be functions but do not define the correct
|
Objects that are not expected to be functions but do not define the correct
|
||||||
[[Class]] internal property do not satisfy the assertion.
|
[[Class]] internal property do not satisfy the assertion.
|
||||||
includes: [testBuiltInObject.js]
|
includes: [testBuiltInObject.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
description: >
|
description: >
|
||||||
Objects that do not define all of the specified "own" properties as
|
Objects that do not define all of the specified "own" properties as
|
||||||
non-enumerable do not satisfy the assertion.
|
non-enumerable do not satisfy the assertion.
|
||||||
includes: [testBuiltInObject.js]
|
includes: [testBuiltInObject.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.defineProperty(obj, 'a', {
|
Object.defineProperty(obj, 'a', {
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
description: >
|
description: >
|
||||||
Objects that do not define all of the specified "own" properties do not
|
Objects that do not define all of the specified "own" properties do not
|
||||||
satisfy the assertion.
|
satisfy the assertion.
|
||||||
includes: [testBuiltInObject.js]
|
includes: [testBuiltInObject.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.defineProperty(obj, 'a', {
|
Object.defineProperty(obj, 'a', {
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
description: >
|
description: >
|
||||||
Objects that do not define all of the specified "own" properties as
|
Objects that do not define all of the specified "own" properties as
|
||||||
configurable do not satisfy the assertion.
|
configurable do not satisfy the assertion.
|
||||||
includes: [testBuiltInObject.js]
|
includes: [testBuiltInObject.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.defineProperty(obj, 'a', {
|
Object.defineProperty(obj, 'a', {
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
description: >
|
description: >
|
||||||
Objects that do not define all of the specified "own" properties as
|
Objects that do not define all of the specified "own" properties as
|
||||||
writable do not satisfy the assertion.
|
writable do not satisfy the assertion.
|
||||||
includes: [testBuiltInObject.js]
|
includes: [testBuiltInObject.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.defineProperty(obj, 'a', {
|
Object.defineProperty(obj, 'a', {
|
||||||
|
@ -4,9 +4,8 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
`undefined` does not satisfy the assertion.
|
`undefined` does not satisfy the assertion.
|
||||||
includes: [testBuiltInObject.js]
|
includes: [testBuiltInObject.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -4,14 +4,8 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
verifyProperty should receive at least 3 arguments: obj, name, and descriptor
|
verifyProperty should receive at least 3 arguments: obj, name, and descriptor
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// monkeypatch the API
|
|
||||||
$ERROR = function $ERROR(message) {
|
|
||||||
throw new Test262Error(message);
|
|
||||||
};
|
|
||||||
|
|
||||||
assert.throws(Test262Error, () => {
|
assert.throws(Test262Error, () => {
|
||||||
verifyProperty();
|
verifyProperty();
|
||||||
}, "0 arguments");
|
}, "0 arguments");
|
||||||
|
@ -4,14 +4,8 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
The desc argument should be an object or undefined
|
The desc argument should be an object or undefined
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// monkeypatch the API
|
|
||||||
$ERROR = function $ERROR(message) {
|
|
||||||
throw new Test262Error(message);
|
|
||||||
};
|
|
||||||
|
|
||||||
var sample = { foo: 42 };
|
var sample = { foo: 42 };
|
||||||
|
|
||||||
assert.throws(Test262Error, () => {
|
assert.throws(Test262Error, () => {
|
||||||
|
@ -4,14 +4,8 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
The first argument should have an own property
|
The first argument should have an own property
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// monkeypatch the API
|
|
||||||
$ERROR = function $ERROR(message) {
|
|
||||||
throw new Test262Error(message);
|
|
||||||
};
|
|
||||||
|
|
||||||
assert.throws(Test262Error, () => {
|
assert.throws(Test262Error, () => {
|
||||||
verifyProperty(Object, 'JeanPaulSartre', {});
|
verifyProperty(Object, 'JeanPaulSartre', {});
|
||||||
}, "inexisting property");
|
}, "inexisting property");
|
||||||
|
@ -4,14 +4,8 @@
|
|||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
Verify an undefined descriptor
|
Verify an undefined descriptor
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js,sta.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// monkeypatch the API
|
|
||||||
$ERROR = function $ERROR(message) {
|
|
||||||
throw new Test262Error(message);
|
|
||||||
};
|
|
||||||
|
|
||||||
var sample = {
|
var sample = {
|
||||||
bar: undefined,
|
bar: undefined,
|
||||||
get baz() {}
|
get baz() {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user