mina
mina copied to clipboard
Add roundtrip test for GraphQL scalar types
Closes #11559
Currently, the tests for these two graphql scalar types are not yet implemented:
Mina_transaction.Transaction_hash.tMina_block.Precomputed.Proof.t
We've used quickcheck for the tests here, and we need generator functions for the aforementioned types, but we can't implement the generator functions becuase:
Mina_transaction.Transaction_hash.tis backed by an abstract type from theblake2/digestiflibrary- The implementation of
Mina_block.Precomputed.Proof.ta very large GADT type. Also, GADT types cannot derivequickcheckusing[@@deriving quickcheck]to automatically give generator functions.
I suggest we move the tests for these types to another issue.
If there are no generators yet, and they are hard to write, then I'd suggest we use a couple of manual test cases for the roundtrip tests for those two types, for now.
Currently, the tests for these two graphql scalar types are not yet implemented:
Mina_transaction.Transaction_hash.tMina_block.Precomputed.Proof.tWe've used
quickcheckfor the tests here, and we need generator functions for the aforementioned types, but we can't implement the generator functions becuase:
Mina_transaction.Transaction_hash.tis backed by an abstract type from theblake2/digestiflibrary- The implementation of
Mina_block.Precomputed.Proof.ta very large GADT type. Also, GADT types cannot derivequickcheckusing[@@deriving quickcheck]to automatically give generator functions.I suggest we move the tests for these types to another issue.
I have written quickcheck tests for Mina_transaction.Transaction_hash.t, and a manual test for Mina_block.Precomputed.Proof.t. I think this is ready for review now.
(EDIT: Mina_block.Precomputed.Proof.t now uses the QuickCheck interface)