[PowerAssert] Add tests to recreate KT-65810
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
wrapper mustEqual "world".length
|
||||
| | |
|
||||
| | 5
|
||||
| Wrapper
|
||||
Holder(wrapper=Wrapper)
|
||||
Complex
|
||||
@@ -0,0 +1,12 @@
|
||||
// FUNCTION: infix.dispatch.Wrapper.mustEqual
|
||||
|
||||
import infix.dispatch.*
|
||||
|
||||
data class Holder<T>(val wrapper: Wrapper<T>)
|
||||
data object Complex {
|
||||
val holder = Holder(Wrapper(3))
|
||||
}
|
||||
|
||||
fun box() = expectThrowableMessage {
|
||||
Complex.holder.wrapper mustEqual "world".length
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
wrapper.mustEqual("world".length)
|
||||
| | |
|
||||
| | 5
|
||||
| Wrapper
|
||||
Holder(wrapper=Wrapper)
|
||||
Complex
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// FUNCTION: infix.dispatch.Wrapper.mustEqual
|
||||
|
||||
import infix.dispatch.*
|
||||
|
||||
data class Holder<T>(val wrapper: Wrapper<T>)
|
||||
data object Complex {
|
||||
val holder = Holder(Wrapper(3))
|
||||
}
|
||||
|
||||
fun box() = expectThrowableMessage {
|
||||
Complex.holder.wrapper.mustEqual("world".length)
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
length mustEqual "world".length
|
||||
| |
|
||||
| 5
|
||||
3
|
||||
ell
|
||||
@@ -0,0 +1,7 @@
|
||||
// FUNCTION: infix.extension.mustEqual
|
||||
|
||||
import infix.extension.*
|
||||
|
||||
fun box() = expectThrowableMessage {
|
||||
"hello".substring(1, 4).length mustEqual "world".length
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
length.mustEqual("world".length)
|
||||
| |
|
||||
| 5
|
||||
3
|
||||
ell
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// FUNCTION: infix.extension.mustEqual
|
||||
|
||||
import infix.extension.*
|
||||
|
||||
fun box() = expectThrowableMessage {
|
||||
"hello".substring(1, 4).length.mustEqual("world".length)
|
||||
}
|
||||
Reference in New Issue
Block a user