aboutsummaryrefslogtreecommitdiff
path: root/test/input
diff options
context:
space:
mode:
Diffstat (limited to 'test/input')
-rw-r--r--test/input/reduce/diff_error.js10
-rw-r--r--test/input/reduce/diff_error.reduced.js17
-rw-r--r--test/input/reduce/setter.js13
-rw-r--r--test/input/reduce/setter.reduced.js20
4 files changed, 24 insertions, 36 deletions
diff --git a/test/input/reduce/diff_error.js b/test/input/reduce/diff_error.js
index ba267c5c..467ee599 100644
--- a/test/input/reduce/diff_error.js
+++ b/test/input/reduce/diff_error.js
@@ -1,5 +1,5 @@
-(function f(a) {
- do {
- console.log(f.length);
- } while (console.log(f += 0));
-})();
+console.log(function(undefined) {
+ return undefined[function() {
+ {}
+ }] || 1 + .1 + .1;
+}(42));
diff --git a/test/input/reduce/diff_error.reduced.js b/test/input/reduce/diff_error.reduced.js
index a76e3d94..3002460b 100644
--- a/test/input/reduce/diff_error.reduced.js
+++ b/test/input/reduce/diff_error.reduced.js
@@ -1,19 +1,14 @@
// (beautified)
-(function f(a) {
- do {
- console.log(f.length);
- } while (console.log(f += 0));
-})();
-// output: 1
-// function(){}0
+console.log(function() {
+ return 1 + .1 + .1;
+}());
+// output: 1.2000000000000002
//
-// minify: 0
-// function(){}0
+// minify: 1.2
//
// options: {
// "compress": {
-// "keep_fargs": false,
-// "unsafe": true
+// "unsafe_math": true
// },
// "mangle": false
// } \ No newline at end of file
diff --git a/test/input/reduce/setter.js b/test/input/reduce/setter.js
index 87228bc4..61ba5952 100644
--- a/test/input/reduce/setter.js
+++ b/test/input/reduce/setter.js
@@ -1,8 +1,5 @@
-console.log(function f(a) {
- ({
- set p(v) {
- f++;
- }
- });
- return f.length;
-}());
+({
+ set p(v) {
+ console.log(+v + .1 + .1);
+ }
+}).p = 1;
diff --git a/test/input/reduce/setter.reduced.js b/test/input/reduce/setter.reduced.js
index e0a3c626..68d5f366 100644
--- a/test/input/reduce/setter.reduced.js
+++ b/test/input/reduce/setter.reduced.js
@@ -1,20 +1,16 @@
// (beautified)
-console.log(function f(a) {
- ({
- set p(v) {
- f++;
- }
- });
- return f.length;
-}());
-// output: 1
+({
+ set p(v) {
+ console.log(1 + .1 + .1);
+ }
+}).p = 0;
+// output: 1.2000000000000002
//
-// minify: 0
+// minify: 1.2
//
// options: {
// "compress": {
-// "keep_fargs": false,
-// "unsafe": true
+// "unsafe_math": true
// },
// "mangle": false
// } \ No newline at end of file