Skip to content

Commit

Permalink
branch-free-equal: Don't use List.init in tests
Browse files Browse the repository at this point in the history
Was not introduced until 4.06.
  • Loading branch information
seliopou committed May 19, 2020
1 parent dbd3d75 commit 54fdeb1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib_test/test_headers.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
open Httpaf
module Array = ArrayLabels
module List = ListLabels

let check msg ~expect actual =
Expand Down Expand Up @@ -43,7 +44,10 @@ let test_remove () =

let test_ci_equal () =
let string_of_char x = String.init 1 (fun _ -> x) in
let ascii = List.init ~len:(0xff + 1) ~f:Char.chr in
let ascii =
Array.init (0xff + 1) ~f:Char.chr
|> Array.to_list
in
let ascii_pairs =
List.map ascii ~f:(fun x ->
List.map ascii ~f:(fun y -> x, y))
Expand Down

0 comments on commit 54fdeb1

Please sign in to comment.