Skip to content

Commit 97c4e4d

Browse files
committed
chore: upgrade qcheck to 0.91, fix deprecation warnings
- small_list -> list_small - bytes_of_size -> bytes_size - small_nat -> nat_small - prefix unused Frame_type constants with underscore
1 parent 6c3e705 commit 97c4e4d

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
(logs :with-test)
2929
(conf-libcurl :with-test)
3030
(ptime :with-test)
31-
(qcheck-core (and (>= 0.9) :with-test))))
31+
(qcheck-core (and (>= 0.91) :with-test))))
3232

3333
(package
3434
(name tiny_httpd_camlzip)

src/ws/tiny_httpd_ws.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ type handler = unit Request.t -> IO.Input.t -> IO.Output.t -> unit
2626
module Frame_type = struct
2727
type t = int
2828

29-
let continuation : t = 0
30-
let text : t = 1
29+
let _continuation : t = 0
30+
let _text : t = 1
3131
let binary : t = 2
32-
let close : t = 8
33-
let ping : t = 9
32+
let _close : t = 8
33+
let _ping : t = 9
3434
let pong : t = 10
3535

3636
let show = function
@@ -132,7 +132,7 @@ module Writer = struct
132132
()
133133

134134
(** Max fragment size: send 16 kB at a time *)
135-
let max_fragment_size = 16 * 1024
135+
let _max_fragment_size = 16 * 1024
136136

137137
let[@inline never] really_output_buf_ (self : t) =
138138
self.header.fin <- true;

tests/unit/t_util.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ let () = assert_eq (Ok [ "foo", "bar" ]) (U.parse_query "yolo#foo=bar")
4040
let () =
4141
add_qcheck
4242
@@ QCheck.Test.make ~name:__LOC__ ~long_factor:20 ~count:1_000
43-
Q.(small_list (pair string string))
43+
Q.(list_small (pair string string))
4444
(fun l ->
4545
List.iter
4646
(fun (a, b) ->

tests/unit/ws/t_ws_q.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ let () =
1414
@@ QCheck.Test.make ~count:10_000
1515
Q.(
1616
triple
17-
(bytes_of_size (Gen.return 4))
18-
(option small_nat)
19-
(bytes_of_size Gen.(0 -- 6000))
17+
(bytes_size (Gen.return 4))
18+
(option nat_small)
19+
(bytes_size Gen.(0 -- 6000))
2020
(* |> Q.add_stat ("b.size", fun (_k, b) -> Bytes.length b) *)
2121
|> Q.add_shrink_invariant (fun (k, _, _) -> Bytes.length k = 4))
2222
(fun (key, mask_offset, b) ->

tiny_httpd.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ depends: [
2222
"logs" {with-test}
2323
"conf-libcurl" {with-test}
2424
"ptime" {with-test}
25-
"qcheck-core" {>= "0.9" & with-test}
25+
"qcheck-core" {>= "0.91" & with-test}
2626
]
2727
depopts: [
2828
"logs"

0 commit comments

Comments
 (0)