summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-6.js
blob: c3e542c7c976a5fb5cb970b61bd05ee2be627955 (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.lastindexof
es5id: 15.4.4.15-8-6
description: Array.prototype.lastIndexOf must return correct index(null)
---*/

  var obj = {toString:function (){return null}};
  var _null = null;
  var a = new Array(true,undefined,0,false,null,1,"str",0,1,null,true,false,undefined,_null,"null",undefined,"str",obj);

assert.sameValue(a.lastIndexOf(null), 13, 'a.lastIndexOf(null)');