aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/compress/numbers.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/compress/numbers.js b/test/compress/numbers.js
index 9fca46f3..32987a6b 100644
--- a/test/compress/numbers.js
+++ b/test/compress/numbers.js
@@ -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,