zkcrypto / bls12_381

Implementation of the BLS12-381 pairing-friendly elliptic curve group
Other
294 stars 177 forks source link

Migrate to property-based testing. #23

Open hdevalence opened 4 years ago

hdevalence commented 4 years ago

Rather than just having unit tests, I think it would be nice to have property-based testing for the library using proptest; this would allow much more detailed testing / structured fuzzing. Also, some existing unit tests could probably be replaced with property-based tests. Would you be interested in a PR that added property-based tests and refactored existing unit tests (as appropriate, obviously only the ones that are really just testing a property on a single example)?

ebfull commented 4 years ago

I like property based testing and I would be okay with refactoring existing white-box tests to use it instead, when appropriate.