summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-8.js
blob: d31afa8f21e2238418dcf94d27938029c4042318 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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 must return correct index (Array)
---*/

var b = new Array("0,1");
var a = new Array(0, b, "0,1", 3);

assert.sameValue(a.lastIndexOf(b.toString()), 2, 'a.lastIndexOf(b.toString())');
assert.sameValue(a.lastIndexOf("0,1"), 2, 'a.lastIndexOf("0,1")');

reportCompare(0, 0);