Skip to content

Commit

Permalink
Merge pull request #9 from mirage/upgrade-hxd
Browse files Browse the repository at this point in the history
Upgrade tests to use hxd.0.3.1
  • Loading branch information
dinosaure authored Mar 7, 2021
2 parents 0b4921d + 5a31f31 commit 9d664a5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .ocamlformat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 0.14.2
version = 0.16.0
break-infix = fit-or-vertical
parse-docstrings = true
indicate-multiline-delimiters=no
Expand Down
2 changes: 1 addition & 1 deletion duff.opam
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ depends: [
"stdlib-shims"
"alcotest" {with-test}
"bigstringaf" {with-test}
"hxd" {with-test}
"hxd" {with-test & >= "0.3.1"}
"crowbar" {with-test}
]

Expand Down
5 changes: 3 additions & 2 deletions fuzz/fuzz.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ open Crowbar

let length l =
List.fold_left
(fun a -> function Duff.Copy (_, len) -> a + len
(fun a -> function
| Duff.Copy (_, len) -> a + len
| Duff.Insert (_, len) -> a + len)
0 l

Expand Down Expand Up @@ -32,5 +33,5 @@ let () =
apply ~len:length a b c rabin ;

check_eq
~pp:(Hxd_string.pp Hxd.O.default)
~pp:(Hxd_string.pp Hxd.default)
~eq:String.equal (Bigstringaf.to_string b) (Bigstringaf.to_string c)
3 changes: 2 additions & 1 deletion test/test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ let test length =
let rabin = Duff.delta index ~source ~target in
let length' =
List.fold_left
(fun a -> function Duff.Copy (_, len) -> a + len
(fun a -> function
| Duff.Copy (_, len) -> a + len
| Duff.Insert (_, len) -> a + len)
0 rabin in

Expand Down

0 comments on commit 9d664a5

Please sign in to comment.