Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / TypedArrayConstructors / internals / HasProperty / BigInt / key-is-lower-than-zero.js
blobe44523863132ab2ca3e6417d487ff711fc23635f
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.
3 /*---
4 esid: sec-integer-indexed-exotic-objects-hasproperty-p
5 description: Return false if P's value is < 0
6 info: |
7   9.4.5.2 [[HasProperty]](P)
9   ...
10   3. If Type(P) is String, then
11     a. Let numericIndex be ! CanonicalNumericIndexString(P).
12     b. If numericIndex is not undefined, then
13       ...
14       iii. If ! IsValidIntegerIndex(O, numericIndex) is false, return false.
15   ...
16 includes: [testBigIntTypedArray.js]
17 features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray]
18 ---*/
21 // Prevents false positives using OrdinaryHasProperty
22 TypedArray.prototype[-1] = "test262";
24 testWithBigIntTypedArrayConstructors(function(TA) {
25   var sample = new TA(1);
27   assert.sameValue(Reflect.has(sample, "-1"), false, 'Reflect.has(sample, "-1") must return false');
28 });
30 reportCompare(0, 0);