aboutsummaryrefslogtreecommitdiff
path: root/test/compress/sequences.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-01-28 09:58:01 +0800
committerGitHub <noreply@github.com>2020-01-28 09:58:01 +0800
commita478f275e421ccbb428f38272e8e673f6684729c (patch)
tree5675ec1824024633fe933dc5c6d261d5d19ecc33 /test/compress/sequences.js
parente9e76dcf040d5076b6046d7273c3509df106fb84 (diff)
downloadtracifyjs-a478f275e421ccbb428f38272e8e673f6684729c.tar.gz
tracifyjs-a478f275e421ccbb428f38272e8e673f6684729c.zip
enhance `sequences` (#3693)
Diffstat (limited to 'test/compress/sequences.js')
-rw-r--r--test/compress/sequences.js26
1 files changed, 25 insertions, 1 deletions
diff --git a/test/compress/sequences.js b/test/compress/sequences.js
index fbca559a..648f6491 100644
--- a/test/compress/sequences.js
+++ b/test/compress/sequences.js
@@ -910,15 +910,23 @@ call: {
console.log(this === b ? "bar" : "baz");
};
(a, b)();
+ (a, b).c();
(a, b.c)();
+ (a, b)["c"]();
+ (a, b["c"])();
(a, function() {
console.log(this === a);
})();
new (a, b)();
+ new (a, b).c();
new (a, b.c)();
+ new (a, b)["c"]();
+ new (a, b["c"])();
new (a, function() {
console.log(this === a);
})();
+ console.log(typeof (a, b).c);
+ console.log(typeof (a, b)["c"]);
}
expect: {
var a = function() {
@@ -931,23 +939,39 @@ call: {
console.log(this === b ? "bar" : "baz");
},
b(),
+ b.c(),
(a, b.c)(),
+ b["c"](),
+ (a, b["c"])(),
function() {
console.log(this === a);
}(),
new b(),
new b.c(),
+ new b.c(),
+ new b["c"](),
+ new b["c"](),
new function() {
console.log(this === a);
- }();
+ }(),
+ console.log((a, typeof b.c)),
+ console.log((a, typeof b["c"]));
}
expect_stdout: [
"foo",
+ "bar",
+ "baz",
+ "bar",
"baz",
"true",
"foo",
"baz",
+ "baz",
+ "baz",
+ "baz",
"false",
+ "function",
+ "function",
]
}