mcpiroman
04/11/2022, 4:19 PMmcpiroman
04/11/2022, 4:20 PMclass Foo : FunSpec({
context("foo") {
withData(listOf(1f, -1f, 100000f)) { n ->
test("add") { n + 3f shouldBeExactly n + 1 + 1 + 1 }
test("multiply") { n * 3f shouldBeExactly n + n + n }
test("power") { n.pow(3f) shouldBeExactly n * n * n }
}
}
})
It works, but yields very messy output:sam
04/11/2022, 4:38 PMmcpiroman
04/11/2022, 5:19 PMsam
04/11/2022, 5:23 PMmcpiroman
04/11/2022, 5:27 PMmcpiroman
04/11/2022, 5:30 PMsam
04/11/2022, 5:58 PM