blob: 6ed427110a1872f0a4aa33c7fd770e092b0e10b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
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);
}
|