summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-8.js
blob: 7e07ce058f78358e51aed526d228ff1a25dfa506 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 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.indexof
es5id: 15.4.4.14-9-8
description: Array.prototype.indexOf must return correct index (Array)
---*/

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

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