From: Alex Lam S.L Date: Tue, 21 Jul 2020 08:17:15 +0000 (+0100) Subject: reduce `ufuzz` test cases that fail to `minify()` (#4021) X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=a98ba994bdcec80e47cf0964534a2d721014b458;p=UglifyJS.git reduce `ufuzz` test cases that fail to `minify()` (#4021) --- diff --git a/test/ufuzz/index.js b/test/ufuzz/index.js index b4059ea4..8f853c9c 100644 --- a/test/ufuzz/index.js +++ b/test/ufuzz/index.js @@ -1137,18 +1137,6 @@ function log(options) { errorln(original_result); errorln("uglified result:"); errorln(uglify_result); - errorln("//-------------------------------------------------------------"); - var reduced = reduce_test(original_code, JSON.parse(options), { - verbose: false, - }).code; - if (reduced) { - errorln(); - errorln("// reduced test case (output will differ)"); - errorln(); - errorln(reduced); - errorln(); - errorln("//-------------------------------------------------------------"); - } } else { errorln("// !!! uglify failed !!!"); errorln(uglify_code); @@ -1159,6 +1147,18 @@ function log(options) { errorln(original_result); } } + errorln("//-------------------------------------------------------------"); + var reduced = reduce_test(original_code, JSON.parse(options), { + verbose: false, + }).code; + if (reduced) { + errorln(); + errorln("// reduced test case (output will differ)"); + errorln(); + errorln(reduced); + errorln(); + errorln("//-------------------------------------------------------------"); + } errorln("minify(options):"); errorln(JSON.stringify(JSON.parse(options), null, 2)); errorln();