File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
kotlinx-coroutines-core/src/test/kotlin/kotlinx/coroutines/experimental/channels Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package kotlinx.coroutines.experimental.channels
18
18
19
- import junit.framework.Assert.assertFalse
20
- import junit.framework.Assert.assertTrue
21
19
import kotlinx.coroutines.experimental.TestBase
22
20
import kotlinx.coroutines.experimental.runBlocking
23
21
import org.hamcrest.MatcherAssert.assertThat
@@ -30,10 +28,10 @@ class LinkedListChannelTest : TestBase() {
30
28
fun testBasic () = runBlocking {
31
29
val c = LinkedListChannel <Int >()
32
30
c.send(1 )
33
- assertTrue (c.offer(2 ))
31
+ check (c.offer(2 ))
34
32
c.send(3 )
35
- assertTrue (c.close())
36
- assertFalse( c.close())
33
+ check (c.close())
34
+ check( ! c.close())
37
35
assertThat(c.receive(), IsEqual (1 ))
38
36
assertThat(c.poll(), IsEqual (2 ))
39
37
assertThat(c.receiveOrNull(), IsEqual (3 ))
You can’t perform that action at this time.
0 commit comments