improve --reduce-test (#3719)
- cover missing cases when eliminating unreferenced labels - format multi-line outputs correctly
This commit is contained in:
22
test/input/reduce/unsafe_math.reduced.js
Normal file
22
test/input/reduce/unsafe_math.reduced.js
Normal file
@@ -0,0 +1,22 @@
|
||||
var b = 0;
|
||||
|
||||
function f0() {
|
||||
var expr2 = (0 - 1 - .1 - .1).toString();
|
||||
for (var key2 in expr2) {
|
||||
--b;
|
||||
}
|
||||
}
|
||||
|
||||
var a_1 = f0();
|
||||
|
||||
console.log(b);
|
||||
// output: -19
|
||||
//
|
||||
// minify: -4
|
||||
//
|
||||
// options: {
|
||||
// "compress": {
|
||||
// "unsafe_math": true
|
||||
// },
|
||||
// "mangle": false
|
||||
// }
|
||||
Reference in New Issue
Block a user