aboutsummaryrefslogtreecommitdiff
path: root/test/compress/numbers.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-04-01 03:02:14 +0800
committerGitHub <noreply@github.com>2017-04-01 03:02:14 +0800
commit257ddc3bdb37efdb48fc23371f5f523e2044afd8 (patch)
tree8b91508961f0acd7c43db5a0e08dc8f932df4a55 /test/compress/numbers.js
parent1ddc05725d078ccf73d711e376c3c530cd517cdb (diff)
downloadtracifyjs-257ddc3bdb37efdb48fc23371f5f523e2044afd8.tar.gz
tracifyjs-257ddc3bdb37efdb48fc23371f5f523e2044afd8.zip
improve compression of undefined, NaN & Infinitiy (#1748)
- migrate transformation logic from `OutputStream` to `Compressor` - always turn `undefined` into `void 0` (unless `unsafe`) - always keep `NaN` except when avoiding local variable redefinition - introduce `keep_infinity` to suppress `1/0` transform, except when avoiding local variable redefinition supersedes #1723 fixes #1730
Diffstat (limited to 'test/compress/numbers.js')
-rw-r--r--test/compress/numbers.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/compress/numbers.js b/test/compress/numbers.js
index 946a7f2d..86545fba 100644
--- a/test/compress/numbers.js
+++ b/test/compress/numbers.js
@@ -186,7 +186,7 @@ unary_binary_parenthesis: {
});
}
expect: {
- var v = [ 0, 1, 0/0, 1/0, null, void 0, true, false, "", "foo", /foo/ ];
+ var v = [ 0, 1, NaN, 1/0, null, void 0, true, false, "", "foo", /foo/ ];
v.forEach(function(x) {
v.forEach(function(y) {
console.log(