diff --git a/test/harness/assert-false.js b/test/harness/assert-false.js index 93b8205813..0c8f175d91 100644 --- a/test/harness/assert-false.js +++ b/test/harness/assert-false.js @@ -4,6 +4,7 @@ /*--- description: > `false` does not satisfy the assertion. +includes: [sta.js] ---*/ var threw = false; diff --git a/test/harness/assert-notsamevalue-nan.js b/test/harness/assert-notsamevalue-nan.js index 856cc482c7..5b784150cd 100644 --- a/test/harness/assert-notsamevalue-nan.js +++ b/test/harness/assert-notsamevalue-nan.js @@ -4,6 +4,7 @@ /*--- description: > Two references to NaN do not satisfy the assertion. +includes: [sta.js] ---*/ var threw = false; diff --git a/test/harness/assert-obj.js b/test/harness/assert-obj.js index edaf82fc69..2b934a3b85 100644 --- a/test/harness/assert-obj.js +++ b/test/harness/assert-obj.js @@ -4,6 +4,7 @@ /*--- description: > An object literal does not satisfy the assertion. +includes: [sta.js] ---*/ var threw = false; diff --git a/test/harness/assert-samevalue-objects.js b/test/harness/assert-samevalue-objects.js index 833f864b4d..03c0d80ba4 100644 --- a/test/harness/assert-samevalue-objects.js +++ b/test/harness/assert-samevalue-objects.js @@ -4,6 +4,7 @@ /*--- description: > Distinct objects do not satisfy the assertion. +includes: [sta.js] ---*/ var threw = false; diff --git a/test/harness/assert-samevalue-zeros.js b/test/harness/assert-samevalue-zeros.js index a4a44a031d..461b93e8ef 100644 --- a/test/harness/assert-samevalue-zeros.js +++ b/test/harness/assert-samevalue-zeros.js @@ -4,6 +4,7 @@ /*--- description: > Positive and negative zero do not satisfy the assertion. +includes: [sta.js] ---*/ var threw = false; diff --git a/test/harness/assert-throws-early-not-early.js b/test/harness/assert-throws-early-not-early.js index b9774492dc..f7b721fe61 100644 --- a/test/harness/assert-throws-early-not-early.js +++ b/test/harness/assert-throws-early-not-early.js @@ -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'); }); diff --git a/test/harness/assert-throws-incorrect-ctor.js b/test/harness/assert-throws-incorrect-ctor.js index b12f06ee77..5384bec0b2 100644 --- a/test/harness/assert-throws-incorrect-ctor.js +++ b/test/harness/assert-throws-incorrect-ctor.js @@ -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; diff --git a/test/harness/assert-throws-native.js b/test/harness/assert-throws-native.js index 7650acb19e..6c03b50fa6 100644 --- a/test/harness/assert-throws-native.js +++ b/test/harness/assert-throws-native.js @@ -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() { diff --git a/test/harness/assert-throws-no-arg.js b/test/harness/assert-throws-no-arg.js index c8a9f3510b..1d37975834 100644 --- a/test/harness/assert-throws-no-arg.js +++ b/test/harness/assert-throws-no-arg.js @@ -4,6 +4,7 @@ /*--- description: > The assertion fails when invoked without arguments. +includes: [sta.js] ---*/ var threw = false; diff --git a/test/harness/assert-throws-no-error.js b/test/harness/assert-throws-no-error.js index d40b06b44c..5b7cfda1de 100644 --- a/test/harness/assert-throws-no-error.js +++ b/test/harness/assert-throws-no-error.js @@ -4,6 +4,7 @@ /*--- description: > Functions that do not throw errors do not satisfy the assertion. +includes: [sta.js] ---*/ var threw = false; diff --git a/test/harness/assert-throws-null-fn.js b/test/harness/assert-throws-null-fn.js index 741751498a..8d974da64d 100644 --- a/test/harness/assert-throws-null-fn.js +++ b/test/harness/assert-throws-null-fn.js @@ -4,6 +4,7 @@ /*--- description: > Fails if second arg is not a function +includes: [sta.js] ---*/ var threw = false; diff --git a/test/harness/assert-throws-null.js b/test/harness/assert-throws-null.js index 7b10f61247..227b83ab4e 100644 --- a/test/harness/assert-throws-null.js +++ b/test/harness/assert-throws-null.js @@ -4,6 +4,7 @@ /*--- description: > Functions that throw the `null` value do not satisfy the assertion. +includes: [sta.js] ---*/ var threw = false; diff --git a/test/harness/assert-throws-primitive.js b/test/harness/assert-throws-primitive.js index f1f86e18e0..9550961793 100644 --- a/test/harness/assert-throws-primitive.js +++ b/test/harness/assert-throws-primitive.js @@ -4,8 +4,8 @@ /*--- description: > Functions that throw primitive values do not satisfy the assertion. +includes: [sta.js] ---*/ - var threw = false; try { diff --git a/test/harness/assert-throws-single-arg.js b/test/harness/assert-throws-single-arg.js index 3606a1608d..ab10128603 100644 --- a/test/harness/assert-throws-single-arg.js +++ b/test/harness/assert-throws-single-arg.js @@ -4,8 +4,8 @@ /*--- description: > The assertion fails when invoked with a single argument. +includes: [sta.js] ---*/ - var threw = false; try { diff --git a/test/harness/assertRelativeDateMs.js b/test/harness/assertRelativeDateMs.js index c8c08b3b67..77022f0747 100644 --- a/test/harness/assertRelativeDateMs.js +++ b/test/harness/assertRelativeDateMs.js @@ -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; diff --git a/test/harness/error.js b/test/harness/error.js index e6cee574f6..36463225c5 100644 --- a/test/harness/error.js +++ b/test/harness/error.js @@ -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.'); } diff --git a/test/harness/propertyhelper-verifyconfigurable-not-configurable-not-strict.js b/test/harness/propertyhelper-verifyconfigurable-not-configurable-not-strict.js index e8216b2329..e84182d79a 100644 --- a/test/harness/propertyhelper-verifyconfigurable-not-configurable-not-strict.js +++ b/test/harness/propertyhelper-verifyconfigurable-not-configurable-not-strict.js @@ -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] ---*/ diff --git a/test/harness/propertyhelper-verifyconfigurable-not-configurable-strict.js b/test/harness/propertyhelper-verifyconfigurable-not-configurable-strict.js index ce438f50fa..23f05344bf 100644 --- a/test/harness/propertyhelper-verifyconfigurable-not-configurable-strict.js +++ b/test/harness/propertyhelper-verifyconfigurable-not-configurable-strict.js @@ -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', { diff --git a/test/harness/propertyhelper-verifyenumerable-not-enumerable-symbol.js b/test/harness/propertyhelper-verifyenumerable-not-enumerable-symbol.js index 6968ca896d..5079502e72 100644 --- a/test/harness/propertyhelper-verifyenumerable-not-enumerable-symbol.js +++ b/test/harness/propertyhelper-verifyenumerable-not-enumerable-symbol.js @@ -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.'); } diff --git a/test/harness/propertyhelper-verifyenumerable-not-enumerable.js b/test/harness/propertyhelper-verifyenumerable-not-enumerable.js index b6ff01410c..861592a9a4 100644 --- a/test/harness/propertyhelper-verifyenumerable-not-enumerable.js +++ b/test/harness/propertyhelper-verifyenumerable-not-enumerable.js @@ -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.'); } diff --git a/test/harness/propertyhelper-verifynotconfigurable-configurable.js b/test/harness/propertyhelper-verifynotconfigurable-configurable.js index 4b66a9b12a..6c8bb5af2d 100644 --- a/test/harness/propertyhelper-verifynotconfigurable-configurable.js +++ b/test/harness/propertyhelper-verifynotconfigurable-configurable.js @@ -5,9 +5,8 @@ description: > Objects whose specified property is configurable do not satisfy the assertion. -includes: [propertyHelper.js] +includes: [propertyHelper.js,sta.js] ---*/ - var threw = false; var obj = {}; Object.defineProperty(obj, 'a', { diff --git a/test/harness/propertyhelper-verifynotconfigurable-not-configurable-strict.js b/test/harness/propertyhelper-verifynotconfigurable-not-configurable-strict.js index b551076365..56f82b31fa 100644 --- a/test/harness/propertyhelper-verifynotconfigurable-not-configurable-strict.js +++ b/test/harness/propertyhelper-verifynotconfigurable-not-configurable-strict.js @@ -5,10 +5,9 @@ description: > Objects whose specified property is not configurable satisfy the assertion in strict mode. -includes: [propertyHelper.js] +includes: [propertyHelper.js,sta.js] flags: [onlyStrict] ---*/ - var obj = {}; Object.defineProperty(obj, 'a', { configurable: false diff --git a/test/harness/propertyhelper-verifynotenumerable-enumerable-symbol.js b/test/harness/propertyhelper-verifynotenumerable-enumerable-symbol.js index 220c4f79c5..80e4ed4286 100644 --- a/test/harness/propertyhelper-verifynotenumerable-enumerable-symbol.js +++ b/test/harness/propertyhelper-verifynotenumerable-enumerable-symbol.js @@ -5,10 +5,9 @@ description: | Objects whose specified symbol property is 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'); diff --git a/test/harness/propertyhelper-verifynotenumerable-enumerable.js b/test/harness/propertyhelper-verifynotenumerable-enumerable.js index 5a9b136870..b22a91c71d 100644 --- a/test/harness/propertyhelper-verifynotenumerable-enumerable.js +++ b/test/harness/propertyhelper-verifynotenumerable-enumerable.js @@ -5,9 +5,8 @@ description: | Objects whose specified string property is enumerable do not satisfy the assertion. -includes: [propertyHelper.js] +includes: [propertyHelper.js,sta.js] ---*/ - var threw = false; var obj = {}; Object.defineProperty(obj, 'a', { diff --git a/test/harness/propertyhelper-verifynotwritable-writable.js b/test/harness/propertyhelper-verifynotwritable-writable.js index 8eb1b75fb7..eb851add34 100644 --- a/test/harness/propertyhelper-verifynotwritable-writable.js +++ b/test/harness/propertyhelper-verifynotwritable-writable.js @@ -4,9 +4,8 @@ /*--- description: > Objects whose specified property is writable do not satisfy the assertion. -includes: [propertyHelper.js] +includes: [propertyHelper.js,sta.js] ---*/ - var threw = false; var obj = {}; Object.defineProperty(obj, 'a', { diff --git a/test/harness/propertyhelper-verifywritable-not-writable-not-strict.js b/test/harness/propertyhelper-verifywritable-not-writable-not-strict.js index bae8fec16d..591aabaa56 100644 --- a/test/harness/propertyhelper-verifywritable-not-writable-not-strict.js +++ b/test/harness/propertyhelper-verifywritable-not-writable-not-strict.js @@ -5,10 +5,9 @@ description: > Objects whose specified property is not writable do not satisfy the assertion outside of strict mode. -includes: [propertyHelper.js] +includes: [propertyHelper.js,sta.js] flags: [noStrict] ---*/ - var threw = false; var obj = {}; Object.defineProperty(obj, 'a', { diff --git a/test/harness/propertyhelper-verifywritable-not-writable-strict.js b/test/harness/propertyhelper-verifywritable-not-writable-strict.js index 85b3046c60..da60196ef6 100644 --- a/test/harness/propertyhelper-verifywritable-not-writable-strict.js +++ b/test/harness/propertyhelper-verifywritable-not-writable-strict.js @@ -5,9 +5,10 @@ description: > Objects whose specified property is not writable 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', { diff --git a/test/harness/propertyhelper-verifywritable-writable.js b/test/harness/propertyhelper-verifywritable-writable.js index 5dc13e8c04..884b7a8dfb 100644 --- a/test/harness/propertyhelper-verifywritable-writable.js +++ b/test/harness/propertyhelper-verifywritable-writable.js @@ -6,7 +6,6 @@ description: > Objects whose specified property is writable satisfy the assertion. includes: [propertyHelper.js] ---*/ - var obj = {}; Object.defineProperty(obj, 'a', { diff --git a/test/harness/testbuiltinobject-function-badstring.js b/test/harness/testbuiltinobject-function-badstring.js index 5b7a4cba6c..7340fdad39 100644 --- a/test/harness/testbuiltinobject-function-badstring.js +++ b/test/harness/testbuiltinobject-function-badstring.js @@ -5,9 +5,8 @@ description: > Objects that are expected to be functions but do not define the correct [[Class]] internal property do not satisfy the assertion. -includes: [testBuiltInObject.js] +includes: [testBuiltInObject.js,sta.js] ---*/ - var threw = false; try { diff --git a/test/harness/testbuiltinobject-function-expected-length.js b/test/harness/testbuiltinobject-function-expected-length.js index cc69d94ddf..1503384bd1 100644 --- a/test/harness/testbuiltinobject-function-expected-length.js +++ b/test/harness/testbuiltinobject-function-expected-length.js @@ -5,9 +5,8 @@ description: > Functions whose `length` property does not match the expected value do not satisfy the assertion. -includes: [testBuiltInObject.js] +includes: [testBuiltInObject.js,sta.js] ---*/ - var threw = false; try { diff --git a/test/harness/testbuiltinobject-function-not-constructor-no-error.js b/test/harness/testbuiltinobject-function-not-constructor-no-error.js index e3b9f73e34..a33597184f 100644 --- a/test/harness/testbuiltinobject-function-not-constructor-no-error.js +++ b/test/harness/testbuiltinobject-function-not-constructor-no-error.js @@ -5,9 +5,8 @@ description: > Non-constructor functions that do not throw an when invoked via `new` do not satisfy the assertion. -includes: [testBuiltInObject.js] +includes: [testBuiltInObject.js,sta.js] ---*/ - var threw = false; try { diff --git a/test/harness/testbuiltinobject-function-not-constructor-no-typeerror.js b/test/harness/testbuiltinobject-function-not-constructor-no-typeerror.js index 4a72bf34f2..10720ad1ab 100644 --- a/test/harness/testbuiltinobject-function-not-constructor-no-typeerror.js +++ b/test/harness/testbuiltinobject-function-not-constructor-no-typeerror.js @@ -5,9 +5,8 @@ description: > Non-constructor functions that do not throw a TypeError when invoked via `new` do not satisfy the assertion. -includes: [testBuiltInObject.js] +includes: [testBuiltInObject.js,sta.js] ---*/ - var threw = false; var fn = function() { throw new Error(); diff --git a/test/harness/testbuiltinobject-non-extensible.js b/test/harness/testbuiltinobject-non-extensible.js index 5d43f711d6..7e1565cb80 100644 --- a/test/harness/testbuiltinobject-non-extensible.js +++ b/test/harness/testbuiltinobject-non-extensible.js @@ -4,9 +4,8 @@ /*--- description: > Objects that are not extensible do not satisfy the assertion. -includes: [testBuiltInObject.js] +includes: [testBuiltInObject.js,sta.js] ---*/ - var threw = false; var obj = {}; Object.preventExtensions(obj); diff --git a/test/harness/testbuiltinobject-not-function-badstring.js b/test/harness/testbuiltinobject-not-function-badstring.js index 9d0e69c95e..00223284c0 100644 --- a/test/harness/testbuiltinobject-not-function-badstring.js +++ b/test/harness/testbuiltinobject-not-function-badstring.js @@ -5,9 +5,8 @@ description: > Objects that are not expected to be functions but do not define the correct [[Class]] internal property do not satisfy the assertion. -includes: [testBuiltInObject.js] +includes: [testBuiltInObject.js,sta.js] ---*/ - var threw = false; try { diff --git a/test/harness/testbuiltinobject-prop-enumerable.js b/test/harness/testbuiltinobject-prop-enumerable.js index fda5a1abd1..fdceb54877 100644 --- a/test/harness/testbuiltinobject-prop-enumerable.js +++ b/test/harness/testbuiltinobject-prop-enumerable.js @@ -5,9 +5,8 @@ description: > Objects that do not define all of the specified "own" properties as non-enumerable do not satisfy the assertion. -includes: [testBuiltInObject.js] +includes: [testBuiltInObject.js,sta.js] ---*/ - var threw = false; var obj = {}; Object.defineProperty(obj, 'a', { diff --git a/test/harness/testbuiltinobject-prop-missing.js b/test/harness/testbuiltinobject-prop-missing.js index bfad8336e5..f27ab008f7 100644 --- a/test/harness/testbuiltinobject-prop-missing.js +++ b/test/harness/testbuiltinobject-prop-missing.js @@ -5,9 +5,8 @@ description: > Objects that do not define all of the specified "own" properties do not satisfy the assertion. -includes: [testBuiltInObject.js] +includes: [testBuiltInObject.js,sta.js] ---*/ - var threw = false; var obj = {}; Object.defineProperty(obj, 'a', { diff --git a/test/harness/testbuiltinobject-prop-not-configurable.js b/test/harness/testbuiltinobject-prop-not-configurable.js index 661e344675..9ad2c8d610 100644 --- a/test/harness/testbuiltinobject-prop-not-configurable.js +++ b/test/harness/testbuiltinobject-prop-not-configurable.js @@ -5,9 +5,8 @@ description: > Objects that do not define all of the specified "own" properties as configurable do not satisfy the assertion. -includes: [testBuiltInObject.js] +includes: [testBuiltInObject.js,sta.js] ---*/ - var threw = false; var obj = {}; Object.defineProperty(obj, 'a', { diff --git a/test/harness/testbuiltinobject-prop-not-writable.js b/test/harness/testbuiltinobject-prop-not-writable.js index 7f2ba95daa..af816a2700 100644 --- a/test/harness/testbuiltinobject-prop-not-writable.js +++ b/test/harness/testbuiltinobject-prop-not-writable.js @@ -5,9 +5,8 @@ description: > Objects that do not define all of the specified "own" properties as writable do not satisfy the assertion. -includes: [testBuiltInObject.js] +includes: [testBuiltInObject.js,sta.js] ---*/ - var threw = false; var obj = {}; Object.defineProperty(obj, 'a', { diff --git a/test/harness/testbuiltinobject-undefined.js b/test/harness/testbuiltinobject-undefined.js index ffab8c7ed1..408ea6942d 100644 --- a/test/harness/testbuiltinobject-undefined.js +++ b/test/harness/testbuiltinobject-undefined.js @@ -4,9 +4,8 @@ /*--- description: > `undefined` does not satisfy the assertion. -includes: [testBuiltInObject.js] +includes: [testBuiltInObject.js,sta.js] ---*/ - var threw = false; try { diff --git a/test/harness/verifyProperty-arguments.js b/test/harness/verifyProperty-arguments.js index 9c2c9faaec..37c9ed3ad8 100644 --- a/test/harness/verifyProperty-arguments.js +++ b/test/harness/verifyProperty-arguments.js @@ -4,14 +4,8 @@ /*--- description: > 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, () => { verifyProperty(); }, "0 arguments"); diff --git a/test/harness/verifyProperty-desc-is-not-object.js b/test/harness/verifyProperty-desc-is-not-object.js index 6df9700a97..418c2893f5 100644 --- a/test/harness/verifyProperty-desc-is-not-object.js +++ b/test/harness/verifyProperty-desc-is-not-object.js @@ -4,14 +4,8 @@ /*--- description: > 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 }; assert.throws(Test262Error, () => { diff --git a/test/harness/verifyProperty-noproperty.js b/test/harness/verifyProperty-noproperty.js index bc63830675..aec783cc5a 100644 --- a/test/harness/verifyProperty-noproperty.js +++ b/test/harness/verifyProperty-noproperty.js @@ -4,14 +4,8 @@ /*--- description: > 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, () => { verifyProperty(Object, 'JeanPaulSartre', {}); }, "inexisting property"); diff --git a/test/harness/verifyProperty-undefined-desc.js b/test/harness/verifyProperty-undefined-desc.js index 315061666d..590fd62892 100644 --- a/test/harness/verifyProperty-undefined-desc.js +++ b/test/harness/verifyProperty-undefined-desc.js @@ -4,14 +4,8 @@ /*--- description: > 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 = { bar: undefined, get baz() {}