aboutsummaryrefslogtreecommitdiff
path: root/test/compress/issue-44.js
blob: 958e525e6cab8dc287d8d8b0a94b0b8965e76057 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
issue_44_valid_ast_1: {
    options = {
        unused: true,
    }
    input: {
        function a(b) {
            for (var i = 0, e = b.qoo(); ; i++) {}
        }
    }
    expect: {
        function a(b) {
            var i = 0;
            for (b.qoo(); ; i++);
        }
    }
}

issue_44_valid_ast_2: {
    options = {
        unused: true,
    }
    input: {
        function a(b) {
            if (foo) for (var i = 0, e = b.qoo(); ; i++) {}
        }
    }
    expect: {
        function a(b) {
            if (foo) {
                var i = 0;
                for (b.qoo(); ; i++);
            }
        }
    }
}