Upgrading a repo from kotlintest to kotest, is it ...
# kotest
b
Upgrading a repo from kotlintest to kotest, is it possible to do property testing with just a specific set of values? (like kotlintest had)
s
You mean you want to hard code some values ?
b
Yeah, I had:
Copy code
forall(
    row(1, 10, -9),
    row(10, 1, 9),
    row(1, 32760, 9),
    row(32760, 1, -9),
    row(1234, 1234, 0)
) { a, b, expected ->
                    Vp8Utils.getExtendedPictureIdDelta(a, b) shouldBe expected
}
a generic one doesn't make much sense here, as in order to verify I'd have to do the same logic I'm testing
s
Arb.element(1,2,3)
you can pass in a collection or vararg
Same thing as Arb.of but I think that's 4.2 only
b
So in this case each element would have to be the three values?
s
no, it's vararg
b
Hm, ok...might be less clear this way. Maybe I'll just write them out
s
Your example was not a property test but a data test
so did you mean data testing in kotest ?
b
Ah! Yes, I guess I got the terms crossed.
should be the same. If you're using a newer version, you might need to flip forall to forAll
b
Oh, great, ok thanks Sam!
s
The lower case version was a hold over from Scala
b
👍