From 73f80aea4d99b70dcc82c6e09653da36b17b7695 Mon Sep 17 00:00:00 2001 From: Leo Balter Date: Wed, 19 Jun 2019 14:06:20 -0400 Subject: [PATCH] Apply review feedback --- .../FinalizationGroup/constructor.js | 1 + .../FinalizationGroup/instance-extensible.js | 2 +- .../prototype-from-newtarget-abrupt.js | 2 +- .../callback-not-callable-throws.js | 20 ++++++++----------- .../prototype/cleanupSome/return-undefined.js | 2 +- .../prototype/register/length.js | 2 +- .../prototype/register/name.js | 2 +- .../register/target-not-object-throws.js | 14 ++++++------- ...terToken-not-object-or-undefined-throws.js | 12 +++++------ .../unregisterToken-not-object-throws.js | 14 ++++++------- .../returns-new-object-from-constructor.js | 2 +- 11 files changed, 35 insertions(+), 38 deletions(-) diff --git a/test/built-ins/FinalizationGroup/constructor.js b/test/built-ins/FinalizationGroup/constructor.js index 137ccf1c00..651ae8918e 100644 --- a/test/built-ins/FinalizationGroup/constructor.js +++ b/test/built-ins/FinalizationGroup/constructor.js @@ -6,6 +6,7 @@ esid: sec-finalization-group-constructor description: > The FinalizationGroup constructor is the %FinalizationGroup% intrinsic object and the initial value of the FinalizationGroup property of the global object. +features: [FinalizationGroup] ---*/ assert.sameValue( diff --git a/test/built-ins/FinalizationGroup/instance-extensible.js b/test/built-ins/FinalizationGroup/instance-extensible.js index e71a303109..cf1187d61c 100644 --- a/test/built-ins/FinalizationGroup/instance-extensible.js +++ b/test/built-ins/FinalizationGroup/instance-extensible.js @@ -23,7 +23,7 @@ info: | 4. Set obj.[[Prototype]] to proto. 5. Set obj.[[Extensible]] to true. 6. Return obj. -features: [FinalizationGroup, Reflect] +features: [FinalizationGroup] ---*/ var fg = new FinalizationGroup(function() {}); diff --git a/test/built-ins/FinalizationGroup/prototype-from-newtarget-abrupt.js b/test/built-ins/FinalizationGroup/prototype-from-newtarget-abrupt.js index a524217201..31aff1aafc 100644 --- a/test/built-ins/FinalizationGroup/prototype-from-newtarget-abrupt.js +++ b/test/built-ins/FinalizationGroup/prototype-from-newtarget-abrupt.js @@ -38,4 +38,4 @@ assert.throws(Test262Error, function() { Reflect.construct(FinalizationGroup, [function() {}], newTarget); }); -assert.sameValue(calls, 1); \ No newline at end of file +assert.sameValue(calls, 1); diff --git a/test/built-ins/FinalizationGroup/prototype/cleanupSome/callback-not-callable-throws.js b/test/built-ins/FinalizationGroup/prototype/cleanupSome/callback-not-callable-throws.js index 7dbd9bbe10..e963368d26 100644 --- a/test/built-ins/FinalizationGroup/prototype/cleanupSome/callback-not-callable-throws.js +++ b/test/built-ins/FinalizationGroup/prototype/cleanupSome/callback-not-callable-throws.js @@ -20,38 +20,34 @@ assert.sameValue(typeof FinalizationGroup.prototype.cleanupSome, 'function'); var fg = new FinalizationGroup(function() {}); assert.throws(TypeError, function() { - fg(undefined); -}, 'undefined'); - -assert.throws(TypeError, function() { - fg(null); + fg.cleanupSome(null); }, 'null'); assert.throws(TypeError, function() { - fg(true); + fg.cleanupSome(true); }, 'true'); assert.throws(TypeError, function() { - fg(false); + fg.cleanupSome(false); }, 'false'); assert.throws(TypeError, function() { - fg(1); + fg.cleanupSome(1); }, 'number'); assert.throws(TypeError, function() { - fg('object'); + fg.cleanupSome('object'); }, 'string'); var s = Symbol(); assert.throws(TypeError, function() { - fg(s); + fg.cleanupSome(s); }, 'symbol'); assert.throws(TypeError, function() { - fg({}); + fg.cleanupSome({}); }, 'object'); assert.throws(TypeError, function() { - fg(FinalizationGroup.prototype); + fg.cleanupSome(FinalizationGroup.prototype); }, 'FinalizationGroup.prototype'); diff --git a/test/built-ins/FinalizationGroup/prototype/cleanupSome/return-undefined.js b/test/built-ins/FinalizationGroup/prototype/cleanupSome/return-undefined.js index bde9510077..1a01f1df97 100644 --- a/test/built-ins/FinalizationGroup/prototype/cleanupSome/return-undefined.js +++ b/test/built-ins/FinalizationGroup/prototype/cleanupSome/return-undefined.js @@ -13,7 +13,7 @@ info: | 4. If callback is not undefined and IsCallable(callback) is false, throw a TypeError exception. 5. Perform ! CleanupFinalizationGroup(finalizationGroup, callback). 6. Return undefined. -features: [FinalizationGroup] +features: [FinalizationGroup, arrow-function, async-functions, async-iteration, class] ---*/ var fn = function() {}; diff --git a/test/built-ins/FinalizationGroup/prototype/register/length.js b/test/built-ins/FinalizationGroup/prototype/register/length.js index ea38fe4def..5c18110ace 100644 --- a/test/built-ins/FinalizationGroup/prototype/register/length.js +++ b/test/built-ins/FinalizationGroup/prototype/register/length.js @@ -26,7 +26,7 @@ features: [FinalizationGroup] verifyProperty(FinalizationGroup.prototype.register, 'length', { value: 2, - writable: false, enumerable: false, + writable: false, configurable: true }); diff --git a/test/built-ins/FinalizationGroup/prototype/register/name.js b/test/built-ins/FinalizationGroup/prototype/register/name.js index c4f4bb44b6..d70988d292 100644 --- a/test/built-ins/FinalizationGroup/prototype/register/name.js +++ b/test/built-ins/FinalizationGroup/prototype/register/name.js @@ -25,7 +25,7 @@ features: [FinalizationGroup] verifyProperty(FinalizationGroup.prototype.register, 'name', { value: 'register', - writable: false, enumerable: false, + writable: false, configurable: true }); diff --git a/test/built-ins/FinalizationGroup/prototype/register/target-not-object-throws.js b/test/built-ins/FinalizationGroup/prototype/register/target-not-object-throws.js index 88efca3984..f128d11531 100644 --- a/test/built-ins/FinalizationGroup/prototype/register/target-not-object-throws.js +++ b/test/built-ins/FinalizationGroup/prototype/register/target-not-object-throws.js @@ -23,30 +23,30 @@ assert.sameValue(typeof FinalizationGroup.prototype.register, 'function'); var fg = new FinalizationGroup(function() {}); assert.throws(TypeError, function() { - fg(undefined); + fg.register(undefined); }, 'undefined'); assert.throws(TypeError, function() { - fg(null); + fg.register(null); }, 'null'); assert.throws(TypeError, function() { - fg(true); + fg.register(true); }, 'true'); assert.throws(TypeError, function() { - fg(false); + fg.register(false); }, 'false'); assert.throws(TypeError, function() { - fg(1); + fg.register(1); }, 'number'); assert.throws(TypeError, function() { - fg('object'); + fg.register('object'); }, 'string'); var s = Symbol(); assert.throws(TypeError, function() { - fg(s); + fg.register(s); }, 'symbol'); diff --git a/test/built-ins/FinalizationGroup/prototype/register/unregisterToken-not-object-or-undefined-throws.js b/test/built-ins/FinalizationGroup/prototype/register/unregisterToken-not-object-or-undefined-throws.js index 10b73b9eee..b0b942ead4 100644 --- a/test/built-ins/FinalizationGroup/prototype/register/unregisterToken-not-object-or-undefined-throws.js +++ b/test/built-ins/FinalizationGroup/prototype/register/unregisterToken-not-object-or-undefined-throws.js @@ -23,26 +23,26 @@ var fg = new FinalizationGroup(function() {}); var target = {}; assert.throws(TypeError, function() { - fg(target, undefined, null); + fg.register(target, undefined, null); }, 'null'); assert.throws(TypeError, function() { - fg(target, undefined, true); + fg.register(target, undefined, true); }, 'true'); assert.throws(TypeError, function() { - fg(target, undefined, false); + fg.register(target, undefined, false); }, 'false'); assert.throws(TypeError, function() { - fg(target, undefined, 1); + fg.register(target, undefined, 1); }, 'number'); assert.throws(TypeError, function() { - fg(target, undefined, 'object'); + fg.register(target, undefined, 'object'); }, 'string'); var s = Symbol(); assert.throws(TypeError, function() { - fg(target, undefined, s); + fg.register(target, undefined, s); }, 'symbol'); diff --git a/test/built-ins/FinalizationGroup/prototype/unregister/unregisterToken-not-object-throws.js b/test/built-ins/FinalizationGroup/prototype/unregister/unregisterToken-not-object-throws.js index 683b6d5ced..de3b8ef598 100644 --- a/test/built-ins/FinalizationGroup/prototype/unregister/unregisterToken-not-object-throws.js +++ b/test/built-ins/FinalizationGroup/prototype/unregister/unregisterToken-not-object-throws.js @@ -20,30 +20,30 @@ assert.sameValue(typeof FinalizationGroup.prototype.unregister, 'function'); var fg = new FinalizationGroup(function() {}); assert.throws(TypeError, function() { - fg(undefined); + fg.unregister(undefined); }, 'undefined'); assert.throws(TypeError, function() { - fg(null); + fg.unregister(null); }, 'null'); assert.throws(TypeError, function() { - fg(true); + fg.unregister(true); }, 'true'); assert.throws(TypeError, function() { - fg(false); + fg.unregister(false); }, 'false'); assert.throws(TypeError, function() { - fg(1); + fg.unregister(1); }, 'number'); assert.throws(TypeError, function() { - fg('object'); + fg.unregister('object'); }, 'string'); var s = Symbol(); assert.throws(TypeError, function() { - fg(s); + fg.unregister(s); }, 'symbol'); diff --git a/test/built-ins/FinalizationGroup/returns-new-object-from-constructor.js b/test/built-ins/FinalizationGroup/returns-new-object-from-constructor.js index 74c0761a7a..10a2f973e1 100644 --- a/test/built-ins/FinalizationGroup/returns-new-object-from-constructor.js +++ b/test/built-ins/FinalizationGroup/returns-new-object-from-constructor.js @@ -18,7 +18,7 @@ info: | ... 2. Let proto be ? GetPrototypeFromConstructor(constructor, intrinsicDefaultProto). 3. Return ObjectCreate(proto, internalSlotsList). -features: [FinalizationGroup] +features: [FinalizationGroup, for-of] ---*/ var cleanupCallback = function() {};