Sorry for bothering... The test in ShrinkingTest f...
# kotest
t
Sorry for bothering... The test in ShrinkingTest fails for me. (I'm getting one line with the original cause, but no shrinking-steps.) My question is: is this a know bug? The reason I'm asking is that I couldn't find an issue about shrinking not working.
s
Which test
t
the test in ShrinkingTest.kt (com.sksamuel.kotest.property.shrinking) (I guess that's an reason why I cannot get automatic shrinking to work?)
s
It works in CI so I guess it must be your machine. Are you on windows?
t
@sam yup
s
Probably line endings are breaking it.
It will be looking for \n and on windows its \r\n
t
I can test this by using lf in the idea, right?
s
Not sure. You could update the tests and do a PR.
t
Oh, the test fails completely... It's not shrinking. The white text being printed is: Property test failed for inputs
Copy code
Property test failed for inputs

0) ""aaVTT$H<<3&rYlvW==(>]8Sga"
1) "Z7XHs_\&5YUAua4^Eq>m$w:-\EtY\3b<$<[WnDk,e'T9I3?1+Rvx;")63cwl!`"

Caused by java.lang.AssertionError: 88 should be < 4 at
	com.sksamuel.kotest.property.shrinking.ShrinkingTest$1$stdout$1$1$1.invokeSuspend(ShrinkingTest.kt:20)
	com.sksamuel.kotest.property.shrinking.ShrinkingTest$1$stdout$1$1$1.invoke(ShrinkingTest.kt)
	io.kotest.property.internal.ProptestKt$proptest$$inlined$forEach$lambda$4.invokeSuspend(proptest.kt:84)
	io.kotest.property.internal.ProptestKt$proptest$$inlined$forEach$lambda$4.invoke(proptest.kt)
s
I see.
that test is disabled?
It looks like its was disabled due to some changes in the random stuff, and then forgotton about and never updated.
t
Does that mean that I cannot expect the shrinking-steps this way, or does it mean that a bug crawled into the code?
s
Shrinking should work fine - this test just needs to be updated.
hmmmm actually it looks like shrinking is not being run
I see what you're saying now
t
All the other tests are using the an shrinker explicitly (If I'm right). Therefor I believe automatic shrinking, so checkall, is not running properly.
s
Yeah makes sense.
t
related, I think ListShrinker in action is missing a
]
?
s
Not sure I understand.
t
ListShrinkerTest.kt:100 This tests, if the listshrinker starts with 4 numbers, I believe that without shrinking, it would also start with those 4 numbers.
s
I guess its a bit of a pointless test then
t
yes, this test should be updated. after shrinking, it should have the 4 numbers specified, but with the closing bracket:
[0, 1, 51, 24]
s
right, if you have time please open the PR
👍🏻 1
t
Ah, I understand now, It's written at the same day as the ShrinkingTest. It's not the responsibility of ListShrinker to know how the test is printed. Therefor it should be removed.
s
You could think of it as an integration test
t
done
👍🏻 1