pawegio
05/18/2020, 10:39 AMLeoColman
05/18/2020, 12:38 PMLeoColman
05/18/2020, 12:39 PMelement.assertSoftly { // I'm not sure if this is released or only snapshot atm
measurements shouldBe XX
something2 shouldBe 1.3
...
}
elect
05/20/2020, 10:25 AMshouldBeSameInstanceAs
elect
05/20/2020, 10:49 AMclass Class : StringSpec() {
init {
"test1" {}
"test2" {}
}
}
elect
05/20/2020, 12:31 PMAdd io.kotest:kotest-runner-console-jvm to your build to execute tests using the kotest plugin. Required version is 4.1 or higher.
bbaldino
05/21/2020, 5:29 AMshouldTimeout
and wrote one for kotest which seems to work, would there be interest in a PR? Or is there a way of doing this that I missed?Sourabh Rawat
05/21/2020, 5:35 AMJP
05/21/2020, 7:01 AMSourabh Rawat
05/21/2020, 8:13 AMCompletableFuture<T>
?bbaldino
05/21/2020, 7:51 PMVinicius Araujo
05/21/2020, 9:07 PMLeoColman
05/22/2020, 6:27 AMshouldContainExactly
might fit your usecase, but if you really want to create a custom matcher, it's not very hard:bbaldino
05/22/2020, 4:05 PMshouldBe
failure exception in the task just gets swallowed by the executor service. (I know this--using a real executor service/threads--is not a great unit test practice, but it's what I'm stuck with for verifying something for now.)LeoColman
05/22/2020, 9:00 PMjaguililla
05/26/2020, 8:11 PMbbaldino
05/28/2020, 6:44 PMwithin (5.milliseconds) {
someField shouldBe someValue
}
sam
05/28/2020, 6:47 PMLeoColman
05/28/2020, 8:41 PMBorzdeG
05/29/2020, 7:41 AMsam
06/04/2020, 11:59 AMLeoColman
06/04/2020, 1:45 PMXuc Xiem
06/05/2020, 5:59 AMList<A>
& List<B>
and a function f: (A, B) -> Boolean
. I want to assert that for every element in listA
there's only one element in listB
so that f(a, b)
is true.
listA.forEach { a ->
listB
.filter { f(a, it) }
.shouldBeSingleton()
}
I want to print out the element a
that makes the assertion fail. How could I do that?Vitali Plagov
06/05/2020, 6:24 AMkotest-assertions-core-jvm
without the kotlintest-runner-junit5
package? I remember when I tried to use just assertions some time ago, it didn’t work and required a junit runner to be added.Sam Garfinkel
06/05/2020, 5:04 PMArb<Any>.orNull()
function? Not finding in 4.0.6simon.vergauwen
06/06/2020, 2:19 PMArb.frequency
function?
And would there be any interest for this operator? You could easily derive choice
from this operator.
It was inspired by frequency
from ScalaTest
, in contrast to choice
it takes a weight
per Arb
.simon.vergauwen
06/06/2020, 2:34 PMListShrinker
is never used. https://github.com/kotest/kotest/blob/master/kotest-property/src/commonMain/kotlin/io/kotest/property/arbitrary/collections.kt#L95simon.vergauwen
06/07/2020, 8:11 AMArb
.
I added the output from values(RandomSource.Default).take(100)
. Am I composing Arb
in an incorrect way?LeoColman
06/10/2020, 7:08 PMwhen I can just use trivial methods from standard library:And also, in my opinion, this is a very weak argument. Why bother using Kotlin if you can write things trivially in Java? Why bother using Java if you can write things trivially in C?
simon.vergauwen
06/11/2020, 12:06 PM