diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-12-28 15:36:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-28 15:36:55 +0800 |
commit | e40a0ee9c6c4dfbd9506dfcbb76ccd1565bc4ad9 (patch) | |
tree | e54e332ac09a75afeeabe6757ec19186140048d7 | |
parent | cb62bd98d3397d9eb3d738cc0c7f53886d3a213b (diff) | |
download | tracifyjs-e40a0ee9c6c4dfbd9506dfcbb76ccd1565bc4ad9.tar.gz tracifyjs-e40a0ee9c6c4dfbd9506dfcbb76ccd1565bc4ad9.zip |
improve assignment variations (#2671)
-rw-r--r-- | test/ufuzz.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/ufuzz.js b/test/ufuzz.js index 14b8f114..1589d5f1 100644 --- a/test/ufuzz.js +++ b/test/ufuzz.js @@ -329,7 +329,8 @@ function createTopLevelCode() { rng(2) == 0 ? createStatements(3, MAX_GENERATION_RECURSION_DEPTH, CANNOT_THROW, CANNOT_BREAK, CANNOT_CONTINUE, CANNOT_RETURN, 0) : createFunctions(rng(MAX_GENERATED_TOPLEVELS_PER_RUN) + 1, MAX_GENERATION_RECURSION_DEPTH, DEFUN_OK, CANNOT_THROW, 0), - 'console.log(null, a, b, c);' // preceding `null` makes for a cleaner output (empty string still shows up etc) + // preceding `null` makes for a cleaner output (empty string still shows up etc) + 'console.log(null, a, b, c, Infinity, NaN, undefined);' ].join('\n'); } @@ -636,6 +637,8 @@ function _createExpression(recurmax, noComma, stmtDepth, canThrow) { case p++: return getVarName(); case p++: + return getVarName() + createAssignment() + createExpression(recurmax, COMMA_OK, stmtDepth, canThrow); + case p++: return createExpression(recurmax, COMMA_OK, stmtDepth, canThrow); case p++: return createExpression(recurmax, noComma, stmtDepth, canThrow) + '?' + createExpression(recurmax, NO_COMMA, stmtDepth, canThrow) + ':' + createExpression(recurmax, noComma, stmtDepth, canThrow); |