From e40a0ee9c6c4dfbd9506dfcbb76ccd1565bc4ad9 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Thu, 28 Dec 2017 15:36:55 +0800 Subject: [PATCH] improve assignment variations (#2671) --- test/ufuzz.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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'); } @@ -635,6 +636,8 @@ function _createExpression(recurmax, noComma, stmtDepth, canThrow) { case p++: 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++: -- 2.34.1