sageserpent-open / americium

Generation of test case data for Scala and Java, in the spirit of QuickCheck. When your test fails, it gives you a minimised failing test case and a way of reproducing the failure immediately.
MIT License
15 stars 1 forks source link

Cleanup overly deep stack traces when tests fail. #30

Closed sageserpent-open closed 2 years ago

sageserpent-open commented 2 years ago

The existing shrinkage mechanism recurses naively - so when a test fails, the final error is shown with an almighty deep stack trace due to the shrinkage steps.

Strictly speaking this isn't a bug, but it does result in a lot of unwanted scrolling past the shrinkage noise.

Furthermore, at some point I'm sure we'll see a stack overflow from the shrinkage itself - not a great offering.

Unrolling the recursion via tail recursion / trampolining / continuations / streaming should sort this out.

sageserpent-open commented 2 years ago

Fixed in release 0.1.27, commit d3b4e4e1b22828f434f2c18161b2f7b78ca5144f