You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to shrink the data inside a command but i cannot find any documentation on how to. In the code below i have a counter i am testing. I have introduced a bug in the increment method of the counter, where the counter does not get incremented if it has a value of 10.
I tried using the shrinker and putting it inside of the CounterCommands object but with no luck, the command data was still not shrunk.
Is it even possible to do this in ScalaCheck? And if yes, how do i do it?
I am using Scala version 2.13.3 and ScalaCheck version 1.14.1.
The text was updated successfully, but these errors were encountered:
I noticed the same shortcoming. Unless I have seriously misunderstood something, it is not possible with the current version of ScalaCheck. That's why I implemented that feature: #632. It has not been merged yet.
I am trying to shrink the data inside a command but i cannot find any documentation on how to. In the code below i have a counter i am testing. I have introduced a bug in the increment method of the counter, where the counter does not get incremented if it has a value of 10.
Running the code gave the output:
Incrementing by 40 is not the minimal value needed to find the bug.
I asked the same question on stackoverflow:
https://stackoverflow.com/questions/64915650/scalacheck-shrinking-command-data-in-stateful-testing
where it was suggested to use the following shrinker:
I tried using the shrinker and putting it inside of the CounterCommands object but with no luck, the command data was still not shrunk.
Is it even possible to do this in ScalaCheck? And if yes, how do i do it?
I am using Scala version 2.13.3 and ScalaCheck version 1.14.1.
The text was updated successfully, but these errors were encountered: