You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: common/kotlinx-coroutines-core-common/src/test/kotlin/kotlinx/coroutines/experimental/CommonWithTimeoutOrNullTest.kt
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -126,4 +126,19 @@ class CommonWithTimeoutOrNullTest : TestBase() {
126
126
println("Executed: $counter times")
127
127
check(counter in1..2)
128
128
}
129
+
130
+
@Test
131
+
funtestBadClass() = runTest {
132
+
val bad =BadClass()
133
+
val result = withTimeoutOrNull(100) {
134
+
bad
135
+
}
136
+
assertSame(bad, result)
137
+
}
138
+
139
+
classBadClass {
140
+
overridefunequals(other:Any?): Boolean= error("Should not be called")
141
+
overridefunhashCode(): Int= error("Should not be called")
142
+
overridefuntoString(): String= error("Should not be called")
0 commit comments