Skip to content

Commit c42b302

Browse files
committed
Add hex tests.
1 parent 84d69f4 commit c42b302

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

jscomp/build_tests/super_errors/expected/intoverflow.res.expected

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,29 @@
2929
5 │ let v5: int = -2_147_483_648
3030
6 │ let v6: int = -2_147_483_649
3131
7 │
32+
8 │ // hex
33+
34+
Integer literal exceeds the range of representable integers of type int
35+
36+
37+
Warning number 107
38+
/.../fixtures/intoverflow.res:11:14-26
39+
40+
9 │ let v7: int = 0xFFFF_FFFF
41+
10 │ let v8: int = -0xFFFF_FFFF
42+
11 │ let v9:int = 0x1_0000_0000
43+
12 │ let v10:int = -0x1_0000_0000
44+
13 │
45+
46+
Integer literal exceeds the range of representable integers of type int
47+
48+
49+
Warning number 107
50+
/.../fixtures/intoverflow.res:12:16-28
51+
52+
10 │ let v8: int = -0xFFFF_FFFF
53+
11 │ let v9:int = 0x1_0000_0000
54+
12 │ let v10:int = -0x1_0000_0000
55+
13 │
3256

3357
Integer literal exceeds the range of representable integers of type int

jscomp/build_tests/super_errors/fixtures/intoverflow.res

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ let v3: int = 2_147_483_649
44
let v4: int = -2_147_483_647
55
let v5: int = -2_147_483_648
66
let v6: int = -2_147_483_649
7+
8+
// hex
9+
let v7: int = 0xFFFF_FFFF
10+
let v8: int = -0xFFFF_FFFF
11+
let v9:int = 0x1_0000_0000
12+
let v10:int = -0x1_0000_0000

0 commit comments

Comments
 (0)