forked from ocaml-community/yojson
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ocaml-community#150 from ocaml-community/mj-out-of…
…-bounds Fix out-of-bounds error in atdgen parsers
- Loading branch information
Showing
7 changed files
with
69 additions
and
1 deletion.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
let yojson = Alcotest.testable Yojson.Safe.pp Yojson.Safe.equal | ||
|
||
let variant_kind_pp fmt = function | ||
| `Edgy_bracket -> Format.fprintf fmt "`Edgy_bracket" | ||
| `Square_bracket -> Format.fprintf fmt "`Square_bracket" | ||
| `Double_quote -> Format.fprintf fmt "`Double_quote" | ||
|
||
let variant_kind_equal a b = | ||
match a, b with | ||
| `Edgy_bracket, `Edgy_bracket -> true | ||
| `Square_bracket, `Square_bracket -> true | ||
| `Double_quote, `Double_quote -> true | ||
| _ -> false | ||
|
||
let variant_kind = Alcotest.testable variant_kind_pp variant_kind_equal |
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 +1,2 @@ | ||
val yojson : Yojson.Safe.t Alcotest.testable | ||
val variant_kind : Yojson.Safe.variant_kind Alcotest.testable |