diff options
Diffstat (limited to 'test/built-ins/TypedArrays/internals/DefineOwnProperty')
11 files changed, 25 insertions, 45 deletions
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/conversion-operation-consistent-nan.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/conversion-operation-consistent-nan.js index 39a11f109..19323c66d 100644 --- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/conversion-operation-consistent-nan.js +++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/conversion-operation-consistent-nan.js @@ -55,9 +55,7 @@ function body(FloatArray) { someNaN = distinctNaNs[idx]; control = new FloatArray([someNaN]); - Object.defineProperty(sample, '0', { - value: someNaN - }); + Object.defineProperty(sample, '0', { value: someNaN }); sampleBytes = new Uint8Array(sample.buffer); controlBytes = new Uint8Array(control.buffer); diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/conversion-operation.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/conversion-operation.js index 26cb90caa..f78228c5b 100644 --- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/conversion-operation.js +++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/conversion-operation.js @@ -47,9 +47,7 @@ includes: [byteConversionValues.js, testTypedArray.js] testTypedArrayConversions(byteConversionValues, function(TA, value, expected, initial) { var sample = new TA([initial]); - Object.defineProperty(sample, "0", { - value: value - }); + Object.defineProperty(sample, "0", {value: value}); assert.sameValue(sample[0], expected, value + " converts to " + expected); }); diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/desc-value-throws.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/desc-value-throws.js index c6c8dd156..6572c1f94 100644 --- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/desc-value-throws.js +++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/desc-value-throws.js @@ -35,8 +35,6 @@ testWithTypedArrayConstructors(function(TA) { var sample = new TA([42]); assert.throws(Test262Error, function() { - Object.defineProperty(sample, "0", { - value: obj - }); + Object.defineProperty(sample, "0", {value: obj}); }); }); diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer.js index e413ab78d..a1039636f 100644 --- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer.js +++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer.js @@ -129,8 +129,6 @@ testWithTypedArrayConstructors(function(TA) { ); assert.throws(Test262Error, function() { - Reflect.defineProperty(sample, "7", { - value: obj - }); + Reflect.defineProperty(sample, "7", {value: obj}); }, "Return Abrupt before Detached Buffer check from ToNumber(desc.value)"); }); diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/key-is-not-canonical-index.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/key-is-not-canonical-index.js index b51c1b602..193d91665 100644 --- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/key-is-not-canonical-index.js +++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/key-is-not-canonical-index.js @@ -72,7 +72,7 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(desc.set, fnset, "accessor's set [" + key + "]"); verifyNotConfigurable(sample2, key); - assert.sameValue(sample2[0], undefined, "no value is set on sample2[0]"); + assert.sameValue(sample2[0], undefined,"no value is set on sample2[0]"); assert.sameValue(sample2.length, 0, "length is still 0"); var sample3 = new TA(); diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/key-is-not-numeric-index.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/key-is-not-numeric-index.js index 4d498e45f..845a9afbe 100644 --- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/key-is-not-numeric-index.js +++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/key-is-not-numeric-index.js @@ -21,9 +21,7 @@ testWithTypedArrayConstructors(function(TA) { var sample = new TA([42, 43]); assert.sameValue( - Reflect.defineProperty(sample, "foo", { - value: 42 - }), + Reflect.defineProperty(sample, "foo", {value:42}), true, "return true after defining property" ); diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/non-extensible-new-key.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/non-extensible-new-key.js index 20bfb67ca..e74c95f12 100644 --- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/non-extensible-new-key.js +++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/non-extensible-new-key.js @@ -22,9 +22,7 @@ testWithTypedArrayConstructors(function(TA) { Object.preventExtensions(sample); assert.sameValue( - Reflect.defineProperty(sample, "foo", { - value: 42 - }), + Reflect.defineProperty(sample, "foo", {value:42}), false, "return false on a non-extensible object - data descriptor" ); diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/non-extensible-redefine-key.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/non-extensible-redefine-key.js index 5b3005e86..a0baaf57e 100644 --- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/non-extensible-redefine-key.js +++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/non-extensible-redefine-key.js @@ -25,9 +25,7 @@ testWithTypedArrayConstructors(function(TA) { Object.preventExtensions(sample); assert.sameValue( - Reflect.defineProperty(sample, "foo", { - value: 42 - }), + Reflect.defineProperty(sample, "foo", {value:42}), true, "data descriptor" ); diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/set-value.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/set-value.js index 8768f035a..ff71bee90 100644 --- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/set-value.js +++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/set-value.js @@ -29,17 +29,13 @@ testWithTypedArrayConstructors(function(TA) { var sample = new TA([0, 0]); assert.sameValue( - Reflect.defineProperty(sample, "0", { - value: 1 - }), + Reflect.defineProperty(sample, "0", {value: 1}), true, "set value for sample[0] returns true" ); assert.sameValue( - Reflect.defineProperty(sample, "1", { - value: 2 - }), + Reflect.defineProperty(sample, "1", {value: 2}), true, "set value for sample[1] returns true" ); diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/this-is-not-extensible.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/this-is-not-extensible.js index 63ff80219..5e586c775 100644 --- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/this-is-not-extensible.js +++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/this-is-not-extensible.js @@ -22,14 +22,10 @@ testWithTypedArrayConstructors(function(TA) { Object.preventExtensions(sample); - assert.sameValue(Reflect.defineProperty(sample, "foo", { - value: 42 - }), false); + assert.sameValue(Reflect.defineProperty(sample, "foo", {value:42}), false); assert.sameValue(Reflect.getOwnPropertyDescriptor(sample, "foo"), undefined); var s = Symbol("1"); - assert.sameValue(Reflect.defineProperty(sample, s, { - value: 42 - }), false); + assert.sameValue(Reflect.defineProperty(sample, s, {value:42}), false); assert.sameValue(Reflect.getOwnPropertyDescriptor(sample, s), undefined); }); diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/tonumber-value-detached-buffer.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/tonumber-value-detached-buffer.js index af6468946..d1975ee63 100644 --- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/tonumber-value-detached-buffer.js +++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/tonumber-value-detached-buffer.js @@ -32,22 +32,24 @@ features: [Reflect, TypedArray] testWithTypedArrayConstructors(function(TA) { var ta = new TA([17]); - var desc = { - value: { - valueOf: function() { - $262.detachArrayBuffer(ta.buffer); - return 42; + var desc = + { + value: { + valueOf: function() { + $262.detachArrayBuffer(ta.buffer); + return 42; + } } - } - }; + }; assert.throws(TypeError, function() { - Reflect.defineProperty(ta, 0, desc); - }, - "detaching a ArrayBuffer during defining an element of a typed array " + - "viewing it should throw"); + Reflect.defineProperty(ta, 0, desc); + }, + "detaching a ArrayBuffer during defining an element of a typed array " + + "viewing it should throw"); assert.throws(TypeError, function() { ta[0]; }); }); + |