mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:38:11 +00:00
20 lines
368 B
JavaScript
20 lines
368 B
JavaScript
load("test-common.js");
|
|
|
|
try {
|
|
var o = {};
|
|
o.a = 1;
|
|
|
|
assert(o.a === 1);
|
|
assert(!o.a === false);
|
|
assert(!o.a === !o.a);
|
|
assert(~o.a === ~o.a);
|
|
assert(+o.a === +o.a);
|
|
assert(-o.a === -o.a);
|
|
|
|
assert((typeof "x" === "string") === true);
|
|
assert(!(typeof "x" === "string") === false);
|
|
|
|
console.log("PASS");
|
|
} catch (e) {
|
|
console.log("FAIL: " + e);
|
|
}
|