summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-18.js
blob: f38439c1c6e1b322c3cf498908ee11857c7ebe1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-array.prototype.lastindexof
description: >
    Array.prototype.lastIndexOf - value of 'fromIndex' is a string
    containing an exponential number
---*/

var targetObj = {};

assert.sameValue([0, NaN, targetObj, 3, false].lastIndexOf(targetObj, "2E0"), 2, '[0, NaN, targetObj, 3, false].lastIndexOf(targetObj, "2E0")');
assert.sameValue([0, NaN, 3, targetObj, false].lastIndexOf(targetObj, "2E0"), -1, '[0, NaN, 3, targetObj, false].lastIndexOf(targetObj, "2E0")');

reportCompare(0, 0);