aboutsummaryrefslogtreecommitdiff
path: root/test/ufuzz
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-03-22 20:59:43 +0000
committerGitHub <noreply@github.com>2021-03-23 04:59:43 +0800
commitf9055df44d86c8537afc34f00bd255792f80422f (patch)
treedcc6102ab6485002fb7255d45d2ae014c7a737f6 /test/ufuzz
parent51bdb7281bb555f0cc56ca15560a8ab514b0a632 (diff)
downloadtracifyjs-f9055df44d86c8537afc34f00bd255792f80422f.tar.gz
tracifyjs-f9055df44d86c8537afc34f00bd255792f80422f.zip
support logical assignment operators (#4813)
Diffstat (limited to 'test/ufuzz')
-rw-r--r--test/ufuzz/index.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/ufuzz/index.js b/test/ufuzz/index.js
index d91fe040..e2bcdf2c 100644
--- a/test/ufuzz/index.js
+++ b/test/ufuzz/index.js
@@ -149,6 +149,7 @@ var SUPPORT = function(matrix) {
for_of: "for (var a of []);",
generator: "function* f(){}",
let: "let a;",
+ logical_assignment: "[].p ??= 0;",
new_target: "function f() { new.target; }",
nullish: "0 ?? 0",
rest: "var [...a] = [];",
@@ -262,10 +263,13 @@ ASSIGNMENTS = ASSIGNMENTS.concat([
">>=",
">>>=",
]);
-if (SUPPORT.exponentiation) {
- ASSIGNMENTS = ASSIGNMENTS.concat(ASSIGNMENTS);
- ASSIGNMENTS.push("**=");
-}
+ASSIGNMENTS = ASSIGNMENTS.concat(ASSIGNMENTS);
+if (SUPPORT.exponentiation) ASSIGNMENTS.push("**=");
+if (SUPPORT.logical_assignment) ASSIGNMENTS = ASSIGNMENTS.concat([
+ "&&=",
+ "||=",
+ "??=",
+]);
var UNARY_SAFE = [
"+",