blob: a4648600d5632a8eea193bb7991442ebd49b1122 (
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 {
assert(void "" === undefined);
assert(void "foo" === undefined);
assert(void 1 === undefined);
assert(void 42 === undefined);
assert(void true === undefined);
assert(void false === undefined);
assert(void null === undefined);
assert(void undefined === undefined);
assert(void function () {} === undefined);
assert(void (() => {}) === undefined);
assert(void (() => "hello friends")() === undefined);
assert((() => void "hello friends")() === undefined);
console.log("PASS");
} catch (e) {
console.log("FAIL: " + e);
}
|