diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-05-19 04:35:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-19 11:35:33 +0800 |
commit | 14eee81dc6afe8c26bbe4b0f2ef1ecc054bcdd13 (patch) | |
tree | c7a9c57eeb5cfb4a4e1fcac9fc35a971c6b168b8 /test | |
parent | 55ebb27878211799f62786fce0548b6949607f0e (diff) | |
download | tracifyjs-14eee81dc6afe8c26bbe4b0f2ef1ecc054bcdd13.tar.gz tracifyjs-14eee81dc6afe8c26bbe4b0f2ef1ecc054bcdd13.zip |
update header comment for `--reduce-test` (#3910)
Diffstat (limited to 'test')
-rw-r--r-- | test/reduce.js | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/test/reduce.js b/test/reduce.js index 9c6a9078..ff2f787c 100644 --- a/test/reduce.js +++ b/test/reduce.js @@ -4,19 +4,17 @@ var List = U.List; var os = require("os"); var sandbox = require("./sandbox"); -// Reduce a ufuzz-style `console.log` based test case by iteratively replacing -// AST nodes with various permutations. Each AST_Statement in the tree is also -// speculatively dropped to determine whether it is needed. If the altered -// tree and the last known good tree produce the same non-nil error-free output -// after being run, then the permutation survives to the next generation and -// is the basis for subsequent iterations. The test case is reduced as a -// consequence of complex expressions being replaced with simpler ones. -// This function assumes that the testcase will not result in a parse or -// runtime Error. Note that a reduced test case will have different runtime -// output - it is not functionally equivalent to the original. The only criteria -// is that once the generated reduced test case is run without minification, it -// will produce different output from the code minified with `minify_options`. -// Returns a `minify` result object with an additonal boolean property `reduced`. +// Reduce a test case by iteratively replacing AST nodes with various +// permutations. Each AST_Statement in the tree is also speculatively dropped +// to determine whether it is needed. If the altered tree and the last known +// good tree produce the same output after being run, then the permutation +// survives to the next generation and is the basis for subsequent iterations. +// The test case is reduced as a consequence of complex expressions being +// replaced with simpler ones. Note that a reduced test case will have +// different runtime output - it is not functionally equivalent to the +// original. The only criteria is that once the generated reduced test case is +// run without minification, it will produce different output from the code +// minified with `minify_options`. Returns a `minify` result object. Error.stackTraceLimit = Infinity; module.exports = function reduce_test(testcase, minify_options, reduce_options) { |