@@ -5,30 +5,30 @@ import kotlinx.coroutines.cancelAndJoin
5
5
import kotlinx.coroutines.delay
6
6
import kotlinx.coroutines.flow.launchIn
7
7
import kotlinx.coroutines.flow.onEach
8
- import kotlinx.coroutines.flow.ticker
8
+ import kotlinx.coroutines.flow.tickerFlow
9
9
import java.util.concurrent.CancellationException
10
10
import kotlin.test.Test
11
11
import kotlin.test.assertEquals
12
12
13
13
14
- class TickerFlowsTest : TestBase () {
14
+ class TickerFlowTest : TestBase () {
15
15
16
16
@Test(expected = IllegalArgumentException ::class )
17
17
fun testNegativePeriod () = runTest {
18
18
// WHEN
19
- ticker (- 1 ).launchIn(this )
19
+ tickerFlow (- 1 ).launchIn(this )
20
20
}
21
21
22
22
@Test(expected = IllegalArgumentException ::class )
23
23
fun testZeroNegativePeriod () = runTest {
24
24
// WHEN
25
- ticker (0 ).launchIn(this )
25
+ tickerFlow (0 ).launchIn(this )
26
26
}
27
27
28
28
@Test(expected = IllegalArgumentException ::class )
29
29
fun testNegativeInitialDelay () = runTest {
30
30
// WHEN
31
- ticker (100 , - 1 ).launchIn(this )
31
+ tickerFlow (100 , - 1 ).launchIn(this )
32
32
}
33
33
34
34
@Test
@@ -38,7 +38,7 @@ class TickerFlowsTest : TestBase() {
38
38
39
39
// WHEN
40
40
val periodicTicker =
41
- ticker (100 , 100 ).onEach {
41
+ tickerFlow (100 , 100 ).onEach {
42
42
inbox.add(Unit )
43
43
}.launchIn(this )
44
44
@@ -58,7 +58,7 @@ class TickerFlowsTest : TestBase() {
58
58
59
59
// WHEN
60
60
val periodicTicker =
61
- ticker (100 ).onEach {
61
+ tickerFlow (100 ).onEach {
62
62
inbox.add(Unit )
63
63
}.launchIn(this )
64
64
@@ -77,7 +77,7 @@ class TickerFlowsTest : TestBase() {
77
77
78
78
// WHEN
79
79
val periodicTicker =
80
- ticker (100 ).onEach {
80
+ tickerFlow (100 ).onEach {
81
81
inbox.add(Unit )
82
82
}.launchIn(this )
83
83
0 commit comments