Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Array / S15.4.2.1_A1.2_T1.js
blob080ed966349da3f8d71f8a1b07c720e807e37411
1 // Copyright 2009 the Sputnik authors.  All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 info: The [[Class]] property of the newly constructed object is set to "Array"
6 es5id: 15.4.2.1_A1.2_T1
7 description: Checking use Object.prototype.toString
8 ---*/
10 var x = new Array();
11 x.getClass = Object.prototype.toString;
12 assert.sameValue(x.getClass(), "[object Array]", 'x.getClass() must return "[object Array]"');
14 var x = new Array(0, 1, 2);
15 x.getClass = Object.prototype.toString;
16 assert.sameValue(x.getClass(), "[object Array]", 'x.getClass() must return "[object Array]"');
18 reportCompare(0, 0);