jobjo / popper

Property-based testing at ease
ISC License
43 stars 1 forks source link

Add ppx for deriving generators and comparators #4

Closed jobjo closed 3 years ago

jobjo commented 3 years ago

Example:

type person = { name : string; age : int option } [@@deriving popper]

Gives:

type person = { name : string; age : int option } [@@deriving popper]

let person_generator = 
  let+ name = string in
  and+ age = option int in
  { name ; age }

let person_comparator = ...