@@ -59,21 +59,23 @@ let%expect_test _ =
5959 i);
6060 [% expect " " ]
6161
62+ let sixty_four = Sys. int_size > 32
63+
6264let % expect_test _ =
6365 let i = Gen. (generate1 (no_shrink out_of_range_i32)) in
6466 let i_trunc = Int32. (shift_right (shift_left i 1 ) 1 ) in
6567 ignore (Int31. of_int32_warning_on_overflow i);
6668 let output = [% expect.output] in
6769 let expected =
6870 Format. sprintf
69- " Warning: integer overflow: integer 0x%lx (%ld) truncated to 0x%lx (%ld); the \
71+ " Warning: integer overflow: int32 0x%lx (%ld) truncated to 0x%lx (%ld); the \
7072 generated code might be incorrect.@."
7173 i
7274 i
7375 i_trunc
7476 i_trunc
7577 in
76- if not (String. equal output expected)
78+ if sixty_four && not (String. equal output expected)
7779 then Format. printf
" Unexpected output string@.%[email protected] :@.%s@." output expected;
7880 [% expect " " ]
7981
@@ -91,7 +93,7 @@ let%expect_test _ =
9193 i_trunc
9294 i_trunc
9395 in
94- if not (String. equal output expected)
96+ if sixty_four && not (String. equal output expected)
9597 then Format. printf
" Unexpected output string@.%[email protected] :@.%s@." output expected;
9698 [% expect " " ]
9799
@@ -102,14 +104,14 @@ let%expect_test _ =
102104 let output = [% expect.output] in
103105 let expected =
104106 Format. sprintf
105- " Warning: integer overflow: integer 0x%nx (%nd) truncated to 0x%lx (%ld); the \
106- generated code might be incorrect.@."
107+ " Warning: integer overflow: native integer 0x%nx (%nd) truncated to 0x%lx (%ld); \
108+ the generated code might be incorrect.@."
107109 i
108110 i
109111 i_trunc
110112 i_trunc
111113 in
112- if not (String. equal output expected)
114+ if sixty_four && not (String. equal output expected)
113115 then Format. printf
" Unexpected output string@.%[email protected] :@.%s@." output expected;
114116 [% expect " " ]
115117
0 commit comments