1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:38:11 +00:00
serenity/Libraries/LibJS/Tests/parser-unary-associativity.js
2020-07-06 23:40:35 +02:00

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);
}