-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tests to use test_lib for extended testing and verify type map…
…ping
- Loading branch information
1 parent
fbd8f8c
commit ada5af4
Showing
6 changed files
with
18 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,8 @@ | ||
open Large | ||
open Ocaml_protoc_plugin | ||
|
||
let%expect_test "Test very large message type" = | ||
let large = Large.make ~x7:7 () in | ||
let writer = Large.to_proto large in | ||
let contents = Writer.contents writer in | ||
Printf.printf "Size of large message: %d\n" (String.length contents); | ||
let reader = Reader.create contents in | ||
let large' = Large.from_proto_exn reader in | ||
Printf.printf "Serialization works: %b\n" (large = large'); | ||
Printf.printf "x7: %d = %d\n" large.x7 large'.x7; | ||
Printf.printf "x5: %d = %d\n" large.x5 large'.x5; | ||
Test_lib.test_encode (module Large) large; | ||
(); | ||
[%expect {| | ||
Size of large message: 2 | ||
Serialization works: true | ||
x7: 7 = 7 | ||
x5: 0 = 0 |}] | ||
x7: 7 |}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters