mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2026-03-07 21:37:57 -05:00
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
This commit is contained in:
parent
6c3e705df5
commit
97c4e4dc08
5 changed files with 11 additions and 11 deletions
|
|
@ -28,7 +28,7 @@
|
|||
(logs :with-test)
|
||||
(conf-libcurl :with-test)
|
||||
(ptime :with-test)
|
||||
(qcheck-core (and (>= 0.9) :with-test))))
|
||||
(qcheck-core (and (>= 0.91) :with-test))))
|
||||
|
||||
(package
|
||||
(name tiny_httpd_camlzip)
|
||||
|
|
|
|||
|
|
@ -26,11 +26,11 @@ type handler = unit Request.t -> IO.Input.t -> IO.Output.t -> unit
|
|||
module Frame_type = struct
|
||||
type t = int
|
||||
|
||||
let continuation : t = 0
|
||||
let text : t = 1
|
||||
let _continuation : t = 0
|
||||
let _text : t = 1
|
||||
let binary : t = 2
|
||||
let close : t = 8
|
||||
let ping : t = 9
|
||||
let _close : t = 8
|
||||
let _ping : t = 9
|
||||
let pong : t = 10
|
||||
|
||||
let show = function
|
||||
|
|
@ -132,7 +132,7 @@ module Writer = struct
|
|||
()
|
||||
|
||||
(** Max fragment size: send 16 kB at a time *)
|
||||
let max_fragment_size = 16 * 1024
|
||||
let _max_fragment_size = 16 * 1024
|
||||
|
||||
let[@inline never] really_output_buf_ (self : t) =
|
||||
self.header.fin <- true;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ let () = assert_eq (Ok [ "foo", "bar" ]) (U.parse_query "yolo#foo=bar")
|
|||
let () =
|
||||
add_qcheck
|
||||
@@ QCheck.Test.make ~name:__LOC__ ~long_factor:20 ~count:1_000
|
||||
Q.(small_list (pair string string))
|
||||
Q.(list_small (pair string string))
|
||||
(fun l ->
|
||||
List.iter
|
||||
(fun (a, b) ->
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ let () =
|
|||
@@ QCheck.Test.make ~count:10_000
|
||||
Q.(
|
||||
triple
|
||||
(bytes_of_size (Gen.return 4))
|
||||
(option small_nat)
|
||||
(bytes_of_size Gen.(0 -- 6000))
|
||||
(bytes_size (Gen.return 4))
|
||||
(option nat_small)
|
||||
(bytes_size Gen.(0 -- 6000))
|
||||
(* |> Q.add_stat ("b.size", fun (_k, b) -> Bytes.length b) *)
|
||||
|> Q.add_shrink_invariant (fun (k, _, _) -> Bytes.length k = 4))
|
||||
(fun (key, mask_offset, b) ->
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ depends: [
|
|||
"logs" {with-test}
|
||||
"conf-libcurl" {with-test}
|
||||
"ptime" {with-test}
|
||||
"qcheck-core" {>= "0.9" & with-test}
|
||||
"qcheck-core" {>= "0.91" & with-test}
|
||||
]
|
||||
depopts: [
|
||||
"logs"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue