-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests] [32bit] update tests for 32bit CI
- Loading branch information
Showing
6 changed files
with
33 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,21 +59,23 @@ let%expect_test _ = | |
i); | ||
[%expect ""] | ||
|
||
let sixty_four = Sys.int_size > 32 | ||
|
||
let%expect_test _ = | ||
let i = Gen.(generate1 (no_shrink out_of_range_i32)) in | ||
let i_trunc = Int32.(shift_right (shift_left i 1) 1) in | ||
ignore (Int31.of_int32_warning_on_overflow i); | ||
let output = [%expect.output] in | ||
let expected = | ||
Format.sprintf | ||
"Warning: integer overflow: integer 0x%lx (%ld) truncated to 0x%lx (%ld); the \ | ||
"Warning: integer overflow: int32 0x%lx (%ld) truncated to 0x%lx (%ld); the \ | ||
generated code might be incorrect.@." | ||
i | ||
i | ||
i_trunc | ||
i_trunc | ||
in | ||
if not (String.equal output expected) | ||
if sixty_four && not (String.equal output expected) | ||
then Format.printf "Unexpected output string@.%[email protected]:@.%s@." output expected; | ||
[%expect ""] | ||
|
||
|
@@ -91,7 +93,7 @@ let%expect_test _ = | |
i_trunc | ||
i_trunc | ||
in | ||
if not (String.equal output expected) | ||
if sixty_four && not (String.equal output expected) | ||
then Format.printf "Unexpected output string@.%[email protected]:@.%s@." output expected; | ||
[%expect ""] | ||
|
||
|
@@ -102,14 +104,14 @@ let%expect_test _ = | |
let output = [%expect.output] in | ||
let expected = | ||
Format.sprintf | ||
"Warning: integer overflow: integer 0x%nx (%nd) truncated to 0x%lx (%ld); the \ | ||
generated code might be incorrect.@." | ||
"Warning: integer overflow: native integer 0x%nx (%nd) truncated to 0x%lx (%ld); \ | ||
the generated code might be incorrect.@." | ||
i | ||
i | ||
i_trunc | ||
i_trunc | ||
in | ||
if not (String.equal output expected) | ||
if sixty_four && not (String.equal output expected) | ||
then Format.printf "Unexpected output string@.%[email protected]:@.%s@." output expected; | ||
[%expect ""] | ||
|
||
|