@@ -3679,6 +3679,8 @@ func TestMangleCharCodeAt(t *testing.T) {
3679
3679
expectPrintedMangle (t , "a = '🧀'.charCodeAt(2)" , "a = NaN;\n " )
3680
3680
3681
3681
expectPrintedMangle (t , "a = 'xy'.charCodeAt(NaN)" , "a = \" xy\" .charCodeAt(NaN);\n " )
3682
+ expectPrintedMangle (t , "a = 'xy'.charCodeAt(-Infinity)" , "a = \" xy\" .charCodeAt(-Infinity);\n " )
3683
+ expectPrintedMangle (t , "a = 'xy'.charCodeAt(Infinity)" , "a = \" xy\" .charCodeAt(Infinity);\n " )
3682
3684
expectPrintedMangle (t , "a = 'xy'.charCodeAt(0.5)" , "a = \" xy\" .charCodeAt(0.5);\n " )
3683
3685
expectPrintedMangle (t , "a = 'xy'.charCodeAt(1e99)" , "a = \" xy\" .charCodeAt(1e99);\n " )
3684
3686
expectPrintedMangle (t , "a = 'xy'.charCodeAt('1')" , "a = \" xy\" .charCodeAt(\" 1\" );\n " )
@@ -3697,6 +3699,7 @@ func TestMangleFromCharCode(t *testing.T) {
3697
3699
expectPrintedMangle (t , "a = String.fromCharCode(0x10078, 0x10079)" , "a = \" xy\" ;\n " )
3698
3700
expectPrintedMangle (t , "a = String.fromCharCode(0x1_0000_FFFF)" , "a = \" \uFFFF \" ;\n " )
3699
3701
expectPrintedMangle (t , "a = String.fromCharCode(NaN)" , "a = \" \\ 0\" ;\n " )
3702
+ expectPrintedMangle (t , "a = String.fromCharCode(-Infinity)" , "a = \" \\ 0\" ;\n " )
3700
3703
expectPrintedMangle (t , "a = String.fromCharCode(Infinity)" , "a = \" \\ 0\" ;\n " )
3701
3704
expectPrintedMangle (t , "a = String.fromCharCode(null)" , "a = \" \\ 0\" ;\n " )
3702
3705
expectPrintedMangle (t , "a = String.fromCharCode(undefined)" , "a = \" \\ 0\" ;\n " )
0 commit comments