Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define generators for our JSON type #23

Closed
GerardvSchie opened this issue Feb 20, 2022 · 0 comments · Fixed by #30
Closed

Define generators for our JSON type #23

GerardvSchie opened this issue Feb 20, 2022 · 0 comments · Fixed by #30

Comments

@GerardvSchie
Copy link
Collaborator

For automated testing it would be useful to have generators

Probably best to generate haskell code equivalent next to it so we know what result to expect
F.e generate these two in the same generator. We take the Haskell as expected and json as result.
JSON: JsonObject $ Map.singleton "+" (JsonArray [JsonNumber 1, JsonNumber 2])
Haskell: ((+) 1 2)

Also keep in mind that some need numeric json as parameters whilst others need booleans.
So generatorNumericJson
generatorBoolJson
generatorStringJson

are some of the generators to expose for testing purposes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant