summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-19.js
blob: 6045c3150d247c1b7bebd1e63ce7a021a09b46a5 (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 a hex number
---*/

var targetObj = {};

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

reportCompare(0, 0);