aboutsummaryrefslogtreecommitdiff
path: root/test/compress/issue-597.js
blob: f243223a7d6772009208c4b3788f4bc96eea2921 (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
NaN_and_Infinity_must_have_parens: {
    options = {};
    input: {
        Infinity.toString();
        NaN.toString();
    }
    expect: {
        (1/0).toString();
        NaN.toString();         // transformation to 0/0 dropped
    }
}

NaN_and_Infinity_should_not_be_replaced_when_they_are_redefined: {
    options = {};
    input: {
        var Infinity, NaN;
        Infinity.toString();
        NaN.toString();
    }
    expect: {
        var Infinity, NaN;
        Infinity.toString();
        NaN.toString();
    }
}