aboutsummaryrefslogtreecommitdiff
path: root/test/compress/typeof.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-10-31 08:00:04 +0800
committerGitHub <noreply@github.com>2019-10-31 08:00:04 +0800
commit1858c2018c0e872e17e31599bd6bed5063322f28 (patch)
treedf8561ab292baf820dc1eee4bf7c47d964473f0b /test/compress/typeof.js
parentec7f071272384db82dff0f8fb6629f4f6fee43a5 (diff)
downloadtracifyjs-1858c2018c0e872e17e31599bd6bed5063322f28.tar.gz
tracifyjs-1858c2018c0e872e17e31599bd6bed5063322f28.zip
enhance `typeofs` (#3556)
Diffstat (limited to 'test/compress/typeof.js')
-rw-r--r--test/compress/typeof.js114
1 files changed, 114 insertions, 0 deletions
diff --git a/test/compress/typeof.js b/test/compress/typeof.js
index 80123834..c3c2e9ec 100644
--- a/test/compress/typeof.js
+++ b/test/compress/typeof.js
@@ -295,3 +295,117 @@ issue_2728_6: {
}
expect_stdout: "function undefined"
}
+
+typeof_defined_1: {
+ options = {
+ side_effects: true,
+ typeofs: true,
+ }
+ input: {
+ "undefined" == typeof A && A;
+ "undefined" != typeof A && A;
+ "undefined" == typeof A || A;
+ "undefined" != typeof A || A;
+ }
+ expect: {
+ "undefined" == typeof A && A;
+ "undefined" != typeof A || A;
+ }
+}
+
+typeof_defined_2: {
+ options = {
+ side_effects: true,
+ typeofs: true,
+ }
+ input: {
+ "function" == typeof A && A;
+ "function" != typeof A && A;
+ "function" == typeof A || A;
+ "function" != typeof A || A;
+ }
+ expect: {
+ "function" != typeof A && A;
+ "function" == typeof A || A;
+ }
+}
+
+typeof_defined_3: {
+ options = {
+ side_effects: true,
+ typeofs: true,
+ }
+ input: {
+ "undefined" == typeof A && "undefined" == typeof B && (A, B);
+ "undefined" == typeof A && "undefined" != typeof B && (A, B);
+ "undefined" != typeof A && "undefined" == typeof B && (A, B);
+ "undefined" != typeof A && "undefined" != typeof B && (A, B);
+ "undefined" == typeof A && "undefined" == typeof B || (A, B);
+ "undefined" == typeof A && "undefined" != typeof B || (A, B);
+ "undefined" != typeof A && "undefined" == typeof B || (A, B);
+ "undefined" != typeof A && "undefined" != typeof B || (A, B);
+ "undefined" == typeof A || "undefined" == typeof B && (A, B);
+ "undefined" == typeof A || "undefined" != typeof B && (A, B);
+ "undefined" != typeof A || "undefined" == typeof B && (A, B);
+ "undefined" != typeof A || "undefined" != typeof B && (A, B);
+ "undefined" == typeof A || "undefined" == typeof B || (A, B);
+ "undefined" == typeof A || "undefined" != typeof B || (A, B);
+ "undefined" != typeof A || "undefined" == typeof B || (A, B);
+ "undefined" != typeof A || "undefined" != typeof B || (A, B);
+ }
+ expect: {
+ "undefined" == typeof A && "undefined" == typeof B && (A, B);
+ "undefined" == typeof A && "undefined" != typeof B && A;
+ "undefined" != typeof A && "undefined" == typeof B && B;
+ "undefined" == typeof A && "undefined" == typeof B || (A, B);
+ "undefined" == typeof A && "undefined" != typeof B || (A, B);
+ "undefined" != typeof A && "undefined" == typeof B || (A, B);
+ "undefined" != typeof A && "undefined" != typeof B || (A, B);
+ "undefined" == typeof A || "undefined" == typeof B && B;
+ "undefined" != typeof A || "undefined" == typeof B && (A, B);
+ "undefined" != typeof A || "undefined" != typeof B && A;
+ "undefined" == typeof A || "undefined" != typeof B || B;
+ "undefined" != typeof A || "undefined" == typeof B || A;
+ "undefined" != typeof A || "undefined" != typeof B || (A, B);
+ }
+}
+
+typeof_defined_4: {
+ options = {
+ side_effects: true,
+ typeofs: true,
+ }
+ input: {
+ "object" == typeof A && "object" == typeof B && (A, B);
+ "object" == typeof A && "object" != typeof B && (A, B);
+ "object" != typeof A && "object" == typeof B && (A, B);
+ "object" != typeof A && "object" != typeof B && (A, B);
+ "object" == typeof A && "object" == typeof B || (A, B);
+ "object" == typeof A && "object" != typeof B || (A, B);
+ "object" != typeof A && "object" == typeof B || (A, B);
+ "object" != typeof A && "object" != typeof B || (A, B);
+ "object" == typeof A || "object" == typeof B && (A, B);
+ "object" == typeof A || "object" != typeof B && (A, B);
+ "object" != typeof A || "object" == typeof B && (A, B);
+ "object" != typeof A || "object" != typeof B && (A, B);
+ "object" == typeof A || "object" == typeof B || (A, B);
+ "object" == typeof A || "object" != typeof B || (A, B);
+ "object" != typeof A || "object" == typeof B || (A, B);
+ "object" != typeof A || "object" != typeof B || (A, B);
+ }
+ expect: {
+ "object" == typeof A && "object" != typeof B && B;
+ "object" != typeof A && "object" == typeof B && A;
+ "object" != typeof A && "object" != typeof B && (A, B);
+ "object" == typeof A && "object" == typeof B || (A, B);
+ "object" == typeof A && "object" != typeof B || (A, B);
+ "object" != typeof A && "object" == typeof B || (A, B);
+ "object" != typeof A && "object" != typeof B || (A, B);
+ "object" == typeof A || "object" == typeof B && A;
+ "object" == typeof A || "object" != typeof B && (A, B);
+ "object" != typeof A || "object" != typeof B && B;
+ "object" == typeof A || "object" == typeof B || (A, B);
+ "object" == typeof A || "object" != typeof B || A;
+ "object" != typeof A || "object" == typeof B || B;
+ }
+}