We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8b6e9e1 + a829ccc commit 27f8e8eCopy full SHA for 27f8e8e
kotlin-testing/src/test/kotlin/testing/style/KotestFreeSpec.kt
@@ -1,6 +1,7 @@
1
package testing.style
2
3
import io.kotest.core.spec.style.FreeSpec
4
+import io.kotest.inspectors.forAll
5
import io.kotest.matchers.shouldBe
6
import testing.common.DistanceConverter
7
import testing.common.Input
@@ -21,4 +22,19 @@ class KotestFreeSpec : FreeSpec({
21
22
}
23
24
25
+
26
+ fun square(a: Int) = a*a
27
28
+ "squares" {
29
+ val testData = listOf(
30
+ 2 to 4,
31
+ 3 to 9,
32
+ 4 to 16,
33
+ 5 to 25
34
+ )
35
+ testData.forAll { (input, expected) ->
36
+ square(input) shouldBe expected
37
+ }
38
39
40
})
0 commit comments