Skip to content

Commit a7bfabb

Browse files
authored
Merge pull request #565 from ocaml-multicore/bump-qcheck
Bump QCheck to 0.26 (and fix float comparisons)
2 parents 9385390 + 20a9468 commit a7bfabb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/common.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
uses: actions/checkout@v4
8888
with:
8989
repository: c-cube/qcheck
90-
ref: v0.25
90+
ref: v0.26
9191
path: multicoretests/qcheck
9292

9393
- name: Pre-Setup

src/floatarray/stm_tests.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ struct
108108
| Get i, Res ((Result (Float,Exn),_), r) ->
109109
if i < 0 || i >= List.length s
110110
then r = Error (Invalid_argument "index out of bounds")
111-
else r = Ok (List.nth s i)
111+
else Result.equal ~ok:Float.equal ~error:(=) r (Ok (List.nth s i))
112112
| Set (i,_), Res ((Result (Unit,Exn),_), r) ->
113113
if i < 0 || i >= List.length s
114114
then r = Error (Invalid_argument "index out of bounds")
@@ -128,7 +128,7 @@ struct
128128
| To_list, Res ((List Float,_),fs) -> List.equal Float.equal fs s
129129
| Mem f, Res ((Bool,_),r) -> r = List.mem f s
130130
| Sort, Res ((Unit,_),r) -> r = ()
131-
| To_seq, Res ((Seq Float,_),r) -> Seq.equal (=) r (List.to_seq s)
131+
| To_seq, Res ((Seq Float,_),r) -> Seq.equal Float.equal r (List.to_seq s)
132132
| _, _ -> false
133133
end
134134

0 commit comments

Comments
 (0)