Skip to content

Commit f5568b7

Browse files
committed
test: fix 32bits
1 parent d8d9c4e commit f5568b7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/test.ml

+5-2
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,14 @@ let size3 () =
9292
ListLabels.iter l ~f:(wr 3)
9393

9494
let size5 () =
95-
let l =
95+
let l32 = M.[(None, Int32 Int32.max_int); (None, Int 0x3fff_ffff)] in
96+
let l64 =
9697
M.
9798
[ (Some (Int Int32.(to_int max_int)), Int32 Int32.max_int)
9899
; (Some (Int ~-1), Int32 0xffff_ffffl) ] in
99-
ListLabels.iter l ~f:(fun (expected, v) -> wr ?expected 5 v)
100+
ListLabels.iter
101+
(if Sys.word_size = 32 then l32 else l64)
102+
~f:(fun (expected, v) -> wr ?expected 5 v)
100103

101104
let size9 () =
102105
let l = M.[(None, Int64 Int64.max_int); (None, Float 0.)] in

0 commit comments

Comments
 (0)