mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
LibJS: Reorganize tests into subfolders
This commit is contained in:
parent
21064a1883
commit
4c48c9d69d
213 changed files with 10 additions and 2 deletions
|
@ -1,40 +0,0 @@
|
|||
load("test-common.js");
|
||||
|
||||
try {
|
||||
assert(Boolean.length === 1);
|
||||
assert(Boolean.name === "Boolean");
|
||||
assert(Boolean.prototype.length === undefined);
|
||||
|
||||
assert(typeof new Boolean() === "object");
|
||||
assert(new Boolean().valueOf() === false);
|
||||
|
||||
var foo = new Boolean(true);
|
||||
var bar = new Boolean(true);
|
||||
|
||||
assert(foo !== bar);
|
||||
assert(foo.valueOf() === bar.valueOf());
|
||||
|
||||
assert(new Boolean(true).toString() === "true");
|
||||
assert(new Boolean(false).toString() === "false");
|
||||
|
||||
assert(typeof Boolean() === "boolean");
|
||||
assert(typeof Boolean(true) === "boolean");
|
||||
|
||||
assert(Boolean() === false);
|
||||
assert(Boolean(false) === false);
|
||||
assert(Boolean(null) === false);
|
||||
assert(Boolean(undefined) === false);
|
||||
assert(Boolean(NaN) === false);
|
||||
assert(Boolean("") === false);
|
||||
assert(Boolean(0.0) === false);
|
||||
assert(Boolean(-0.0) === false);
|
||||
assert(Boolean(true) === true);
|
||||
assert(Boolean("0") === true);
|
||||
assert(Boolean({}) === true);
|
||||
assert(Boolean([]) === true);
|
||||
assert(Boolean(1)) === true;
|
||||
|
||||
console.log("PASS");
|
||||
} catch (err) {
|
||||
console.log("FAIL: " + err);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue