blob: 3fb2f831243493f7bdaa53b435808336bd712d72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: If length is zero, return the empty string
esid: sec-array.prototype.join
description: Checking this use new Array() and []
---*/
var x = new Array();
if (x.join() !== "") {
throw new Test262Error('#1: x = new Array(); x.join() === "". Actual: ' + (x.join()));
}
x = [];
x[0] = 1;
x.length = 0;
if (x.join() !== "") {
throw new Test262Error('#2: x = []; x[0] = 1; x.length = 0; x.join() === "". Actual: ' + (x.join()));
}
reportCompare(0, 0);
|