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

Fix QCheck2.gen.list_size Stack overflow #160

Merged
merged 3 commits into from
Sep 7, 2021

Conversation

jmid
Copy link
Collaborator

@jmid jmid commented Aug 18, 2021

This PR addresses issue #156. It

  • replaces QCheck2.gen.list_size with a tail-recursive generator over Tree.t similar to @sir4ur0n's suggestion
  • updates the expected test outputs
  • removes the custom length printer from the list_equal_dupl test (to ensure that both counterexamples are [0])

Copy link
Contributor

@sir4ur0n sir4ur0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good (besides the minor comment I added), thank you

test/core/QCheck2_expect_test.ml Outdated Show resolved Hide resolved
@jmid jmid merged commit f750ccf into c-cube:master Sep 7, 2021
@jmid jmid deleted the QCheck2.Gen.list_size-fix-stack_overflow branch September 7, 2021 12:31
@jmid jmid linked an issue Sep 7, 2021 that may be closed by this pull request
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 this pull request may close these issues.

QCheck2.Gen.list_size stackoverflow on big sizes
2 participants