Skip to content

Commit d55af6a

Browse files
committed
Cosmetic clean-ups
1 parent c65989d commit d55af6a

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/bigarray/stm_tests.ml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ struct
5757
Array1.fill ba 0 ;
5858
ba
5959

60-
let cleanup _ = ()
60+
let cleanup _ = ()
6161

62-
let precond n _s = match n with
63-
| _ -> true
62+
let precond _n _s = true
6463

6564
let run n ba = match n with
6665
| Size_in_bytes -> Res (STM.int, Array1.size_in_bytes ba)
@@ -71,15 +70,15 @@ struct
7170
| Fill n -> Res (result unit exn, protect (Array1.fill ba) n)
7271

7372
let postcond n (s:int list) res = match n, res with
74-
| Size_in_bytes, Res ((Int,_),i) -> i = 8 * (List.length s)
73+
| Size_in_bytes, Res ((Int,_),r) -> r = 8 * (List.length s)
7574
| Get i, Res ((Result (Int,Exn),_), r) ->
7675
if i < 0 || i >= List.length s
77-
then r = Error (Invalid_argument "index out of bounds")
78-
else r = Ok (List.nth s i)
76+
then r = Error (Invalid_argument "index out of bounds")
77+
else r = Ok (List.nth s i)
7978
| Set (i,_), Res ((Result (Unit,Exn),_), r) ->
8079
if i < 0 || i >= List.length s
81-
then r = Error (Invalid_argument "index out of bounds")
82-
else r = Ok ()
80+
then r = Error (Invalid_argument "index out of bounds")
81+
else r = Ok ()
8382
(* STM don't support bigarray type for the moment*)
8483
(* | Sub (i,l), Res ((Result (Array Char,Exn),_), r) ->
8584
if i < 0 || l < 0 || i+l > List.length s

0 commit comments

Comments
 (0)