Skip to content

Commit

Permalink
Silence yojson deprecation warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas committed Aug 11, 2019
1 parent b187eaa commit 7550dc1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions graphql-async/test/async_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ open Async_kernel
open Async_unix

let yojson = (module struct
type t = Yojson.Basic.json
type t = Yojson.Basic.json [@@warning "-3"]

let pp formatter t =
Format.pp_print_text formatter (Yojson.Basic.pretty_to_string t)

let equal = (=)
end : Alcotest.TESTABLE with type t = Yojson.Basic.json)
end : Alcotest.TESTABLE with type t = Yojson.Basic.json) [@@warning "-3"]

let test_query schema ctx query expected =
Thread_safe.block_on_async_exn begin fun () ->
Expand Down
4 changes: 2 additions & 2 deletions graphql-lwt/test/lwt_test.ml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
open Lwt

let yojson = (module struct
type t = Yojson.Basic.json
type t = Yojson.Basic.json [@@warning "-3"]

let pp formatter t =
Format.pp_print_text formatter (Yojson.Basic.pretty_to_string t)

let equal = (=)
end : Alcotest.TESTABLE with type t = Yojson.Basic.json)
end : Alcotest.TESTABLE with type t = Yojson.Basic.json) [@@warning "-3"]

let test_query schema ctx query expected =
Lwt_main.run begin
Expand Down
2 changes: 1 addition & 1 deletion graphql/test/test_common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let yojson = (module struct
Format.pp_print_text formatter (Yojson.Basic.pretty_to_string t)

let equal = (=)
end : Alcotest.TESTABLE with type t = Yojson.Basic.json)
end : Alcotest.TESTABLE with type t = Yojson.Basic.json) [@@warning "-3"]

let list_of_seq seq =
let rec loop seq =
Expand Down

0 comments on commit 7550dc1

Please sign in to comment.