typelevel / typelevel/weaver-test

scalacheck: maximumDiscarded is not calculated properly for some values of minimumSuccessful

Open
#100 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
85
Forks
15
PR merge metrics
No merged PRs in 30d

Description

This issue was copied over from: https://github.com/disneystreaming/weaver-test/issues/526
It was opened by: wedens


If minimumSuccessful is set to 10 property tests will fail with "Discarded more inputs (0) than allowed" error message.

This calculation will result in 0 for minimumSuccessful = 10 and the rest of the values being left as defaults.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with modules/scalacheck/src/weaver/scalacheck/CheckConfig.scala at line 15, where maximumDiscarded is calculated. Reproduce the property-test case with minimumSuccessful set to 10 and the other values at their defaults. Done means the calculation no longer produces zero incorrectly and the erroneous discarded-input failure is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.