enhance unsafe_math (#4093)

This commit is contained in:
Alex Lam S.L
2020-09-04 03:14:39 +01:00
committed by GitHub
parent 6e235602fb
commit 226aa1f76b
2 changed files with 24 additions and 6 deletions

View File

@@ -637,6 +637,22 @@ evaluate_7_unsafe_math: {
]
}
evaluate_8_unsafe_math: {
options = {
evaluate: true,
unsafe_math: true,
}
input: {
var a = [ "42" ];
console.log(a * (1 / 7));
}
expect: {
var a = [ "42" ];
console.log(+a / 7);
}
expect_stdout: "6"
}
NaN_redefined: {
options = {
evaluate: true,