Michael Strasser
10/20/2021, 11:46 AMtypealias Matcher = (String) -> Boolean
data class Thing(matcher: Matcher)
This fails:
it("compares values of function types") {
val testThing = Thing({ it.startsWith("test") })
testThing.matcher shouldBe { it.startsWith("test") }
}
with messages like:
expected:<(kotlin.String) -> kotlin.Boolean> but was:<(kotlin.String) -> kotlin.Boolean>
sam
10/20/2021, 11:55 AMMichael Strasser
10/20/2021, 11:56 AM