From 88979b5b121c3563a87a1869e325af26d1ec3bf4 Mon Sep 17 00:00:00 2001 From: Alexey Shvayka Date: Tue, 2 Mar 2021 17:25:32 +0200 Subject: [PATCH] Align [[Value]] ToNumber tests with updated spec --- .../BigInt/tonumber-value-detached-buffer.js | 6 +++--- .../DefineOwnProperty/tonumber-value-detached-buffer.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/tonumber-value-detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/tonumber-value-detached-buffer.js index 4e74f0cfe9..fc4fc5406b 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/tonumber-value-detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/tonumber-value-detached-buffer.js @@ -5,7 +5,7 @@ esid: sec-integer-indexed-exotic-objects-defineownproperty-p-desc description: > Defining a typed array element to a value that, when converted to the typed array element type, detaches the typed array's underlying buffer, should return - false and not modify the typed array. + true and not modify the typed array. info: | 9.4.5.3 [[DefineOwnProperty]] ( P, Desc ) @@ -51,8 +51,8 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue( Reflect.defineProperty(ta, 0, desc), - false, - 'Reflect.defineProperty(ta, 0, {value: {valueOf() {$DETACHBUFFER(ta.buffer); return 42n;}}}) must return false' + true, + 'Reflect.defineProperty(ta, 0, {value: {valueOf() {$DETACHBUFFER(ta.buffer); return 42n;}}}) must return true' ); assert.sameValue(ta[0], undefined, 'The value of ta[0] is expected to equal `undefined`'); diff --git a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/tonumber-value-detached-buffer.js b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/tonumber-value-detached-buffer.js index 19d989d500..0612728344 100644 --- a/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/tonumber-value-detached-buffer.js +++ b/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/tonumber-value-detached-buffer.js @@ -6,7 +6,7 @@ esid: sec-integer-indexed-exotic-objects-defineownproperty-p-desc description: > Defining a typed array element to a value that, when converted to the typed array element type, detaches the typed array's underlying buffer, should - return false and not modify the typed array. + return true and not modify the typed array. info: | 9.4.5.3 [[DefineOwnProperty]] ( P, Desc ) @@ -54,8 +54,8 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue( Reflect.defineProperty(ta, 0, desc), - false, - 'Reflect.defineProperty(ta, 0, {value: {valueOf() {$DETACHBUFFER(ta.buffer); return 42;}}} ) must return false' + true, + 'Reflect.defineProperty(ta, 0, {value: {valueOf() {$DETACHBUFFER(ta.buffer); return 42;}}} ) must return true' ); assert.sameValue(ta[0], undefined, 'The value of ta[0] is expected to equal `undefined`'); });