Skip to content

Commit a3f7202

Browse files
committed
Adjust model to account for varying word size
1 parent aafebc0 commit a3f7202

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bigarray/stm_tests.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ struct
6969
(* | Sub (i,l) -> Res (result (array char) exn, protect (Array.sub a i) l) *)
7070
| Fill n -> Res (result unit exn, protect (Array1.fill ba) n)
7171

72+
let word_size_in_bytes = Sys.word_size / 8
73+
7274
let postcond n (s:int list) res = match n, res with
73-
| Size_in_bytes, Res ((Int,_),r) -> r = 8 * (List.length s)
75+
| Size_in_bytes, Res ((Int,_),r) -> r = word_size_in_bytes * (List.length s)
7476
| Get i, Res ((Result (Int,Exn),_), r) ->
7577
if i < 0 || i >= List.length s
7678
then r = Error (Invalid_argument "index out of bounds")

0 commit comments

Comments
 (0)