summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Tuple/prototype/includes/fromIndex-infinity.js
blob: 3ed0c3b43c96d581b97b6ac910123ddf79b912d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// |reftest| skip-if(!this.hasOwnProperty("Tuple"))
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-array.prototype.includes
description: handle Infinity values for fromIndex
---*/

var sample = #[42, 43, 43, 41];

assertEq(
  sample.includes(43, Infinity),
  false,
  "includes(43, Infinity)"
);
assertEq(
  sample.includes(43, -Infinity),
  true,
  "includes(43, -Infinity)"
);

reportCompare(0, 0);