1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 esid: sec-integer-indexed-exotic-objects-set-p-v-receiver
6 Returns true, even if index is -0
8 9.4.5.5 [[Set]] ( P, V, Receiver)
11 2. If Type(P) is String, then
12 a. Let numericIndex be ! CanonicalNumericIndexString(P).
13 b. If numericIndex is not undefined, then
14 i. Perform ? IntegerIndexedElementSet(O, numericIndex, V).
18 includes: [testTypedArray.js]
19 features: [align-detached-buffer-semantics-with-web-reality, Reflect, TypedArray]
22 testWithTypedArrayConstructors(function(TA) {
23 var sample = new TA([42]);
25 assert.sameValue(Reflect.set(sample, "-0", 1), true, 'Reflect.set(sample, "-0", 1) must return true');
26 assert.sameValue(sample.hasOwnProperty("-0"), false, 'sample.hasOwnProperty("-0") must return false');