aboutsummaryrefslogtreecommitdiff
path: root/test/ufuzz
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-05-09 22:25:44 +0100
committerGitHub <noreply@github.com>2020-05-10 05:25:44 +0800
commit97728c4f0bb3a9fe3f135371deaa94afaad7921c (patch)
tree5bdf3a861db2696002cc09b4b4cffd14c8515e18 /test/ufuzz
parentf74b7f74019e796c95c228dc6b0348f9db6e709f (diff)
downloadtracifyjs-97728c4f0bb3a9fe3f135371deaa94afaad7921c.tar.gz
tracifyjs-97728c4f0bb3a9fe3f135371deaa94afaad7921c.zip
improve AST validation (#3864)
Diffstat (limited to 'test/ufuzz')
-rw-r--r--test/ufuzz/index.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/ufuzz/index.js b/test/ufuzz/index.js
index 6e02d83c..1a2163ed 100644
--- a/test/ufuzz/index.js
+++ b/test/ufuzz/index.js
@@ -1161,6 +1161,7 @@ for (var round = 1; round <= num_iterations; round++) {
(errored ? fallback_options : minify_options).forEach(function(options) {
var o = JSON.parse(options);
var toplevel = sandbox.has_toplevel(o);
+ o.validate = true;
uglify_code = UglifyJS.minify(original_code, o);
original_result = orig_result[toplevel ? 1 : 0];
if (!uglify_code.error) {
@@ -1181,9 +1182,7 @@ for (var round = 1; round <= num_iterations; round++) {
}
} else {
uglify_code = uglify_code.error;
- if (errored) {
- ok = uglify_code.name == original_result.name;
- }
+ ok = sandbox.same_stdout(original_result, uglify_result);
}
if (verbose || (verbose_interval && !(round % INTERVAL_COUNT)) || !ok) log(options);
else if (errored) {