We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd6a5bf commit f7d0177Copy full SHA for f7d0177
kotlinx-coroutines-core/common/test/channels/ChannelReceiveOrClosedTest.kt
@@ -125,10 +125,11 @@ class ChannelReceiveOrClosedTest : TestBase() {
125
fun testToString() = runTest {
126
val channel = Channel<String>(1)
127
channel.send("message")
128
- channel.close(TestException1())
+ channel.close(TestException1("OK"))
129
assertEquals("Value(message)", channel.receiveOrClosed().toString())
130
// toString implementation for exception differs on every platform
131
val str = channel.receiveOrClosed().toString()
132
- assertTrue(str.matches("Closed\\(.*TestException1\\)".toRegex()))
+ if (!str.matches("Closed\\(.*TestException1: OK\\)".toRegex()))
133
+ error("Unexpected string: '$str'")
134
}
135
0 commit comments