Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Array / S15.4.2.1_A1.1_T2.js
blob17a7a33d2e4cd60a8576be4810111cb50a3d6ed6
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: |
6     The [[Prototype]] property of the newly constructed object
7     is set to the original Array prototype object, the one that
8     is the initial value of Array.prototype
9 es5id: 15.4.2.1_A1.1_T2
10 description: Array.prototype.toString = Object.prototype.toString
11 ---*/
13 Array.prototype.toString = Object.prototype.toString;
14 var x = new Array();
15 assert.sameValue(x.toString(), "[object Array]", 'x.toString() must return "[object Array]"');
17 Array.prototype.toString = Object.prototype.toString;
18 var x = new Array(0, 1, 2);
19 assert.sameValue(x.toString(), "[object Array]", 'x.toString() must return "[object Array]"');
21 reportCompare(0, 0);