Skip to content

Commit

Permalink
improve testing compatibility with Node.js (#5204)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlamsl committed Dec 6, 2021
1 parent 033d8d9 commit d2e7c4a
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 55 deletions.
12 changes: 6 additions & 6 deletions test/compress/bigint.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ arithmetic: {
}
expect_exact: "console.log((1n+0x2n)*(0o3n- -4n)>>5n-6n);"
expect_stdout: "42n"
node_version: ">=10"
node_version: ">=10.4.0"
}

minus_dot: {
Expand All @@ -13,7 +13,7 @@ minus_dot: {
}
expect_exact: "console.log(typeof-42n.toString(),typeof(-42n).toString());"
expect_stdout: "number string"
node_version: ">=10"
node_version: ">=10.4.0"
}

evaluate: {
Expand All @@ -28,7 +28,7 @@ evaluate: {
console.log(0xdeadbeefn.toString(16));
}
expect_stdout: "deadbeef"
node_version: ">=10"
node_version: ">=10.4.0"
}

Number: {
Expand All @@ -42,7 +42,7 @@ Number: {
console.log(+("" + -0xfeed_dead_beef_badn));
}
expect_stdout: "-1148098955808013200"
node_version: ">=10"
node_version: ">=10.4.0"
}

issue_4590: {
Expand All @@ -58,7 +58,7 @@ issue_4590: {
0n || console.log("PASS");
}
expect_stdout: "PASS"
node_version: ">=10"
node_version: ">=10.4.0"
}

issue_4801: {
Expand Down Expand Up @@ -88,5 +88,5 @@ issue_4801: {
}
}
expect_stdout: "PASS"
node_version: ">=10"
node_version: ">=10.4.0"
}
10 changes: 5 additions & 5 deletions test/compress/default-values.js
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ mangle_arrow_1: {
});
}
expect_stdout: "PASS"
node_version: ">=6"
node_version: ">=6.9.3"
}

mangle_arrow_1_toplevel: {
Expand Down Expand Up @@ -1073,7 +1073,7 @@ mangle_arrow_1_toplevel: {
});
}
expect_stdout: "PASS"
node_version: ">=6"
node_version: ">=6.9.3"
}

mangle_arrow_2: {
Expand Down Expand Up @@ -1109,7 +1109,7 @@ mangle_arrow_2: {
});
}
expect_stdout: "PASS"
node_version: ">=6"
node_version: ">=6.9.3"
}

mangle_arrow_2_toplevel: {
Expand Down Expand Up @@ -1145,7 +1145,7 @@ mangle_arrow_2_toplevel: {
});
}
expect_stdout: "PASS"
node_version: ">=6"
node_version: ">=6.9.3"
}

issue_4444: {
Expand Down Expand Up @@ -1587,7 +1587,7 @@ issue_4510_2: {
};
}
expect_stdout: "PASS"
node_version: ">=8"
node_version: ">=8.3.0"
}

issue_4523: {
Expand Down
4 changes: 2 additions & 2 deletions test/compress/destructured.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ funarg_side_effects_2: {
}
}
expect_stdout: "PASS"
node_version: ">=6"
node_version: ">=6.9.2"
}

funarg_side_effects_3: {
Expand Down Expand Up @@ -254,7 +254,7 @@ funarg_side_effects_3: {
}
}
expect_stdout: "PASS"
node_version: ">=6"
node_version: ">=6.9.2"
}

funarg_unused_1: {
Expand Down
2 changes: 1 addition & 1 deletion test/compress/exponentiation.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ assignment_2: {
}
expect_exact: "var a=8n;a**=a;console.log(a);"
expect_stdout: "16777216n"
node_version: ">=10"
node_version: ">=10.4.0"
}

evaluate: {
Expand Down
30 changes: 15 additions & 15 deletions test/compress/rests.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ arrow_destructured_object_1: {
}
expect_exact: "var f=({...a})=>a,o=f({PASS:42});for(var k in o)console.log(k,o[k]);"
expect_stdout: "PASS 42"
node_version: ">=8"
node_version: ">=8.3.0"
}

arrow_destructured_object_2: {
Expand All @@ -62,7 +62,7 @@ arrow_destructured_object_2: {
}
expect_exact: "var f=({FAIL:a,...b})=>b,o=f({PASS:42,FAIL:null});for(var k in o)console.log(k,o[k]);"
expect_stdout: "PASS 42"
node_version: ">=8"
node_version: ">=8.3.0"
}

arrow_destructured_object_3: {
Expand All @@ -79,7 +79,7 @@ arrow_destructured_object_3: {
"2 S",
"3 S",
]
node_version: ">=8"
node_version: ">=8.3.0"
}

funarg_1: {
Expand Down Expand Up @@ -131,7 +131,7 @@ destructured_object_1: {
}
expect_exact: 'var{...a}=["FAIL","PASS",42];console.log(a[1],a[2]);'
expect_stdout: "PASS 42"
node_version: ">=8"
node_version: ">=8.3.0"
}

destructured_object_2: {
Expand All @@ -141,7 +141,7 @@ destructured_object_2: {
}
expect_exact: 'var{0:a,...b}=["FAIL","PASS",42];console.log(b[1],b[2]);'
expect_stdout: "PASS 42"
node_version: ">=8"
node_version: ">=8.3.0"
}

drop_fargs: {
Expand Down Expand Up @@ -231,7 +231,7 @@ reduce_destructured_object: {
console.log(a[0]);
}
expect_stdout: "PASS"
node_version: ">=8"
node_version: ">=8.3.0"
}

retain_destructured_array: {
Expand Down Expand Up @@ -270,7 +270,7 @@ retain_destructured_object_1: {
"1 PASS",
"2 42",
]
node_version: ">=8"
node_version: ">=8.3.0"
}

retain_destructured_object_2: {
Expand All @@ -292,7 +292,7 @@ retain_destructured_object_2: {
"bar PASS",
"baz 42",
]
node_version: ">=8"
node_version: ">=8.3.0"
}

retain_funarg_destructured_array_1: {
Expand Down Expand Up @@ -344,7 +344,7 @@ retain_funarg_destructured_object_1: {
console.log((({ ...a }) => a)([ "PASS" ])[0]);
}
expect_stdout: "PASS"
node_version: ">=8"
node_version: ">=8.3.0"
}

retain_funarg_destructured_object_2: {
Expand All @@ -362,7 +362,7 @@ retain_funarg_destructured_object_2: {
}({ p: "FAIL" }).p || "PASS");
}
expect_stdout: "PASS"
node_version: ">=8"
node_version: ">=8.3.0"
}

drop_unused_call_args_1: {
Expand Down Expand Up @@ -482,7 +482,7 @@ merge_funarg_destructured_object: {
})([ "PASS" ]);
}
expect_stdout: "PASS"
node_version: ">=8"
node_version: ">=8.3.0"
}

keep_arguments: {
Expand Down Expand Up @@ -992,7 +992,7 @@ issue_5089_1: {
console.log(o.p);
}
expect_stdout: "undefined"
node_version: ">=8"
node_version: ">=8.3.0"
}

issue_5089_2: {
Expand All @@ -1019,7 +1019,7 @@ issue_5089_2: {
console.log(o.p);
}
expect_stdout: "undefined"
node_version: ">=8"
node_version: ">=8.3.0"
}

issue_5100_1: {
Expand Down Expand Up @@ -1054,7 +1054,7 @@ issue_5100_1: {
console.log(a.r);
}
expect_stdout: "PASS"
node_version: ">=8"
node_version: ">=8.3.0"
}

issue_5100_2: {
Expand Down Expand Up @@ -1085,7 +1085,7 @@ issue_5100_2: {
} ][0]);
}
expect_stdout: "PASS"
node_version: ">=10"
node_version: ">=10.22.0"
}

issue_5108: {
Expand Down

0 comments on commit d2e7c4a

Please sign in to comment.