2020-04-13 14:31:13 -03:00
|
|
|
load("test-common.js");
|
|
|
|
|
|
2020-04-04 17:28:21 -03:00
|
|
|
try {
|
|
|
|
|
assert(Array.length === 1);
|
2020-05-02 15:18:55 -03:00
|
|
|
assert(Array.name === "Array");
|
2020-04-04 17:28:21 -03:00
|
|
|
assert(Array.prototype.length === 0);
|
2020-05-02 15:18:55 -03:00
|
|
|
|
2020-04-04 17:28:21 -03:00
|
|
|
assert(typeof Array() === "object");
|
|
|
|
|
assert(typeof new Array() === "object");
|
|
|
|
|
|
2020-05-02 15:18:55 -03:00
|
|
|
var a = new Array(5);
|
|
|
|
|
assert(a.length === 5);
|
2020-04-04 17:28:21 -03:00
|
|
|
|
|
|
|
|
console.log("PASS");
|
|
|
|
|
} catch (e) {
|
2020-05-02 15:18:55 -03:00
|
|
|
console.log("FAIL: " + e);
|
2020-04-04 17:28:21 -03:00
|
|
|
}
|