mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
LibJS: Add "name" property to functions
This commit is contained in:
parent
d007e8d00f
commit
99be27b4a1
16 changed files with 118 additions and 16 deletions
|
@ -2,15 +2,16 @@ load("test-common.js");
|
|||
|
||||
try {
|
||||
assert(Array.length === 1);
|
||||
assert(Array.name === "Array");
|
||||
assert(Array.prototype.length === 0);
|
||||
|
||||
assert(typeof Array() === "object");
|
||||
assert(typeof new Array() === "object");
|
||||
|
||||
x = new Array(5);
|
||||
|
||||
assert(x.length === 5);
|
||||
var a = new Array(5);
|
||||
assert(a.length === 5);
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e.message);
|
||||
console.log("FAIL: " + e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue