Skip to content
Snippets Groups Projects
Commit 1a2244fa authored by Rick Waldron's avatar Rick Waldron Committed by Leo Balter
Browse files

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: default avatarRick Waldron <waldron.rick@gmail.com>
parent 0d2b3562
Branches
No related tags found
No related merge requests found
Showing
with 24 additions and 25 deletions
......@@ -4,6 +4,7 @@
/*---
description: >
`false` does not satisfy the assertion.
includes: [sta.js]
---*/
var threw = false;
......
......@@ -4,6 +4,7 @@
/*---
description: >
Two references to NaN do not satisfy the assertion.
includes: [sta.js]
---*/
var threw = false;
......
......@@ -4,6 +4,7 @@
/*---
description: >
An object literal does not satisfy the assertion.
includes: [sta.js]
---*/
var threw = false;
......
......@@ -4,6 +4,7 @@
/*---
description: >
Distinct objects do not satisfy the assertion.
includes: [sta.js]
---*/
var threw = false;
......
......@@ -4,6 +4,7 @@
/*---
description: >
Positive and negative zero do not satisfy the assertion.
includes: [sta.js]
---*/
var threw = false;
......
......@@ -4,13 +4,8 @@
/*---
description: >
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.early(ReferenceError, 'x = 1');
});
......@@ -5,6 +5,7 @@
description: >
Functions that throw values whose constructor does not match the specified
constructor do not satisfy the assertion.
includes: [sta.js]
---*/
var threw = false;
......
......@@ -5,6 +5,7 @@
description: >
Functions that throw instances of the specified native Error constructor
satisfy the assertion.
includes: [sta.js]
---*/
assert.throws(Error, function() {
......
......@@ -4,6 +4,7 @@
/*---
description: >
The assertion fails when invoked without arguments.
includes: [sta.js]
---*/
var threw = false;
......
......@@ -4,6 +4,7 @@
/*---
description: >
Functions that do not throw errors do not satisfy the assertion.
includes: [sta.js]
---*/
var threw = false;
......
......@@ -4,6 +4,7 @@
/*---
description: >
Fails if second arg is not a function
includes: [sta.js]
---*/
var threw = false;
......
......@@ -4,6 +4,7 @@
/*---
description: >
Functions that throw the `null` value do not satisfy the assertion.
includes: [sta.js]
---*/
var threw = false;
......
......@@ -4,8 +4,8 @@
/*---
description: >
Functions that throw primitive values do not satisfy the assertion.
includes: [sta.js]
---*/
var threw = false;
try {
......
......@@ -4,8 +4,8 @@
/*---
description: >
The assertion fails when invoked with a single argument.
includes: [sta.js]
---*/
var threw = false;
try {
......
......@@ -4,7 +4,7 @@
description: >
Only passes when the provided date is exactly the specified number of
milliseconds from the Unix epoch
includes: [assertRelativeDateMs.js]
includes: [assertRelativeDateMs.js,sta.js]
---*/
var thrown;
......
......@@ -3,10 +3,10 @@
/*---
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.
includes: [sta.js]
---*/
var threw = false;
try {
......@@ -25,5 +25,5 @@ try {
}
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: >
Objects whose specified property is not configurable do not satisfy the
assertion outside of strict mode.
includes: [propertyHelper.js]
includes: [propertyHelper.js,sta.js]
flags: [noStrict]
---*/
......
......@@ -5,10 +5,9 @@
description: >
Objects whose specified property is not configurable do not satisfy the
assertion in strict mode.
includes: [propertyHelper.js]
includes: [propertyHelper.js,sta.js]
flags: [onlyStrict]
---*/
var threw = false;
var obj = {};
Object.defineProperty(obj, 'a', {
......
......@@ -5,10 +5,9 @@
description: |
Objects whose specified symbol property is not enumerable do not satisfy the
assertion.
includes: [propertyHelper.js]
includes: [propertyHelper.js,sta.js]
features: [Symbol]
---*/
var threw = false;
var obj = {};
var s = Symbol('1');
......@@ -29,7 +28,5 @@ try {
}
if (threw === false) {
throw new Test262Error(
'Expected a Test262Error, but no error was thrown for symbol key.'
);
$ERROR('Expected a Test262Error, but no error was thrown.');
}
......@@ -5,9 +5,8 @@
description: |
Objects whose specified string property is not enumerable do not satisfy the
assertion.
includes: [propertyHelper.js]
includes: [propertyHelper.js,sta.js]
---*/
var threw = false;
var obj = {};
Object.defineProperty(obj, 'a', {
......@@ -27,7 +26,5 @@ try {
}
if (threw === false) {
throw new Test262Error(
'Expected a Test262Error, but no error was thrown for string key.'
);
$ERROR('Expected a Test262Error, but no error was thrown.');
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment