aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkzc <zaxxon2011@gmail.com>2015-10-28 13:41:41 -0400
committerRichard van Velzen <rvanvelzen@experty.com>2015-10-29 08:19:12 +0100
commit841a661071a70d1b1c222e7c0f35fb05c6b7b041 (patch)
treebd03179e2f8cc69560da4fe450456f486b124cca
parent7491d07666822fe943bd5f5768a5761b562c634a (diff)
downloadtracifyjs-841a661071a70d1b1c222e7c0f35fb05c6b7b041.tar.gz
tracifyjs-841a661071a70d1b1c222e7c0f35fb05c6b7b041.zip
more tests for `return undefined` optimization
-rw-r--r--test/compress/return_undefined.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/compress/return_undefined.js b/test/compress/return_undefined.js
index be79d89d..b1195a72 100644
--- a/test/compress/return_undefined.js
+++ b/test/compress/return_undefined.js
@@ -69,6 +69,15 @@ return_void_0_true: {
bar(b);
return undefined;
}
+ function f10() {
+ return false;
+ }
+ function f11() {
+ return null;
+ }
+ function f12() {
+ return 0;
+ }
}
expect: {
function f0() {}
@@ -103,6 +112,15 @@ return_void_0_true: {
foo(a);
bar(b);
}
+ function f10() {
+ return !1;
+ }
+ function f11() {
+ return null;
+ }
+ function f12() {
+ return 0;
+ }
}
}
@@ -177,6 +195,15 @@ return_void_0_false: {
bar(b);
return undefined;
}
+ function f10() {
+ return false;
+ }
+ function f11() {
+ return null;
+ }
+ function f12() {
+ return 0;
+ }
}
expect: {
function f0() {
@@ -224,6 +251,15 @@ return_void_0_false: {
bar(b);
return void 0;
}
+ function f10() {
+ return !1;
+ }
+ function f11() {
+ return null;
+ }
+ function f12() {
+ return 0;
+ }
}
}