https://kotlinlang.org logo
#test
Title
# test
d

dmcg

03/08/2024, 1:53 PM
Property-based testing with jqwik and Kotlin

https://youtu.be/xgDPvlgUSLE

K 1
d

dave08

03/11/2024, 11:01 AM
Nice example of property-testing! But really I personally like this better than jqwik's annotations and generator functions:
Copy code
forAll(<http://Arb.int|Arb.int>(21..150)) { a ->
         isDrinkingAge(a) // assuming some function that calculates if we're old enough to drink
      }
from: https://kotest.io/docs/proptest/property-test-functions.html#specifying-generators
d

dmcg

03/15/2024, 9:54 AM
The annotations are a bit irritating it’s true. How have you found kotest’s shrinking @dave08?
d

dave08

03/17/2024, 10:30 AM
I can't say I've analysed them in-depth, but they seem to be reasonable.
2 Views