Skip to content

Commit

Permalink
Remove unneeded reference to Caml standard library for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andersfugmann committed Jun 15, 2023
1 parent 4e14340 commit eb1c431
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion test/primitive_types_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ let%expect_test _ =
}
in
let bin = T.to_proto t in
Caml.Printf.printf "Size: %d%!" (Ocaml_protoc_plugin.Writer.contents bin |> String.length);
Printf.printf "Size: %d%!" (Ocaml_protoc_plugin.Writer.contents bin |> String.length);
[%expect {| Size: 0 |}]


Expand Down
18 changes: 9 additions & 9 deletions test/service_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ let call i =
|> (function Ok r -> r | Error _ -> failwith "Error")

let%expect_test _ =
Caml.Printf.printf "name: \"%s\"\n" S.String_of_int.Call.name;
Caml.Printf.printf "package_name: \"%s\"\n" @@ Option.value ~default:"<none>" S.String_of_int.Call.package_name;
Caml.Printf.printf "service_name: \"%s\"\n" S.String_of_int.Call.service_name;
Caml.Printf.printf "method_name: \"%s\"\n" S.String_of_int.Call.method_name;
Printf.printf "name: \"%s\"\n" S.String_of_int.Call.name;
Printf.printf "package_name: \"%s\"\n" @@ Option.value ~default:"<none>" S.String_of_int.Call.package_name;
Printf.printf "service_name: \"%s\"\n" S.String_of_int.Call.service_name;
Printf.printf "method_name: \"%s\"\n" S.String_of_int.Call.method_name;
[%expect {|
name: "/service.p1.p2.p3.String_of_int/Call"
package_name: "service.p1.p2.p3"
service_name: "String_of_int"
method_name: "Call" |}]

let%expect_test _ =
Caml.Printf.printf "%d -> \"%s\"\n" 0 (call 0);
Caml.Printf.printf "%d -> \"%s\"\n" 5 (call 5);
Caml.Printf.printf "%d -> \"%s\"\n" 50 (call 50);
Caml.Printf.printf "%d -> \"%s\"\n" (-5) (call (-5));
Caml.Printf.printf "%d -> \"%s\"\n" (-100) (call (-100));
Printf.printf "%d -> \"%s\"\n" 0 (call 0);
Printf.printf "%d -> \"%s\"\n" 5 (call 5);
Printf.printf "%d -> \"%s\"\n" 50 (call 50);
Printf.printf "%d -> \"%s\"\n" (-5) (call (-5));
Printf.printf "%d -> \"%s\"\n" (-100) (call (-100));
();
[%expect {|
0 -> "0"
Expand Down
2 changes: 1 addition & 1 deletion test/test_lib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let hexlify data =
List.rev !acc
|> List.map ~f:(Printf.sprintf "%02x")
|> String.concat ~sep:"-"
|> Caml.Printf.printf "Buffer: '%s'\n"
|> Printf.printf "Buffer: '%s'\n"

let dump_protoc ?(protoc_args=[]) name data =
let protobuf_file, type_name =
Expand Down

0 comments on commit eb1c431

Please sign in to comment.