| 1 |
// Copyright 2009 the Sputnik authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
esid: sec-array-len |
| 6 |
info: The [[Class]] property of the newly constructed object is set to "Array" |
| 7 |
es5id: 15.4.2.2_A1.2_T1 |
| 8 |
description: Checking use Object.prototype.toString |
| 9 |
---*/ |
| 10 |
|
| 11 |
//CHECK#1 |
| 12 |
var x = new Array(0); |
| 13 |
x.getClass = Object.prototype.toString; |
| 14 |
if (x.getClass() !== "[object " + "Array" + "]") { |
| 15 |
$ERROR('#1: var x = new Array(0); x.getClass = Object.prototype.toString; x is Array object. Actual: ' + (x.getClass())); |
| 16 |
} |