aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-06-01 04:33:05 +0800
committerGitHub <noreply@github.com>2017-06-01 04:33:05 +0800
commitec095ed647691b3458ec9e65e89ff92d5151abc4 (patch)
tree60cf1f1d92938bbcbb3d02b9ea562ad259727755 /test
parent17e73121fa641c14fd9f4cdd3310bf3e8ec037d0 (diff)
downloadtracifyjs-ec095ed647691b3458ec9e65e89ff92d5151abc4.tar.gz
tracifyjs-ec095ed647691b3458ec9e65e89ff92d5151abc4.zip
whitelist `unsafe` `evaluate` candidates (#2039)
- all arguments may accept constant values - return constant value - free of side effects - available & identical across locales and runtime environments
Diffstat (limited to 'test')
-rw-r--r--test/compress/evaluate.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js
index 020d7cf3..99245d0d 100644
--- a/test/compress/evaluate.js
+++ b/test/compress/evaluate.js
@@ -780,13 +780,15 @@ unsafe_charAt_noop: {
input: {
console.log(
s.charAt(0),
- "string".charAt(x)
+ "string".charAt(x),
+ (typeof x).charAt()
);
}
expect: {
console.log(
s.charAt(0),
- "string".charAt(x)
+ "string".charAt(x),
+ (typeof x)[0]
);
}
}