Skip to content

Commit d78e8ad

Browse files
committed
Fix some warnings
1 parent 5520b65 commit d78e8ad

File tree

6 files changed

+6
-9
lines changed

6 files changed

+6
-9
lines changed

kotlinx-coroutines-test/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*/
44

55
val experimentalAnnotations = listOf(
6+
"kotlin.Experimental",
67
"kotlinx.coroutines.ExperimentalCoroutinesApi",
78
"kotlinx.coroutines.InternalCoroutinesApi"
89
)

kotlinx-coroutines-test/common/src/TestCoroutineDispatcher.kt

+1-5
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,7 @@ public class TestCoroutineDispatcher: CoroutineDispatcher(), Delay, DelayControl
6868
/** @suppress */
6969
override fun invokeOnTimeout(timeMillis: Long, block: Runnable, context: CoroutineContext): DisposableHandle {
7070
val node = postDelayed(block, timeMillis)
71-
return object : DisposableHandle {
72-
override fun dispose() {
73-
queue.remove(node)
74-
}
75-
}
71+
return DisposableHandle { queue.remove(node) }
7672
}
7773

7874
/** @suppress */

kotlinx-coroutines-test/common/src/TestCoroutineScope.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import kotlin.coroutines.*
1414
public interface TestCoroutineScope: CoroutineScope, UncaughtExceptionCaptor, DelayController {
1515
/**
1616
* Call after the test completes.
17-
* Calls [UncaughtExceptionCaptor.cleanupTestCoroutines] and [DelayController.cleanupTestCoroutines].
17+
* Calls [UncaughtExceptionCaptor.cleanupTestCoroutinesCaptor] and [DelayController.cleanupTestCoroutines].
1818
*
1919
* @throws Throwable the first uncaught exception, if there are any uncaught exceptions.
2020
* @throws UncompletedCoroutinesError if any pending tasks are active, however it will not throw for suspended

kotlinx-coroutines-test/common/src/internal/MainTestDispatcher.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ internal class TestMainDispatcherFactory : MainDispatcherFactory {
6969

7070
/**
7171
* [Int.MAX_VALUE] -- test dispatcher always wins no matter what factories are present in the classpath.
72-
* By default all actions are delegated to the second-priority dispatcher, so that it won't be the issue.
72+
* By default, all actions are delegated to the second-priority dispatcher, so that it won't be the issue.
7373
*/
7474
override val loadPriority: Int
7575
get() = Int.MAX_VALUE

kotlinx-coroutines-test/common/test/TestBuildersTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class TestBuildersTest {
5858
}
5959

6060
@Test
61-
fun scopeRunBlocking_disablesImmedateOnExit() {
61+
fun scopeRunBlocking_disablesImmediatelyOnExit() {
6262
val scope = TestCoroutineScope()
6363
scope.runBlockingTest {
6464
assertRunsFast {

kotlinx-coroutines-test/common/test/TestCoroutineExceptionHandlerTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import kotlin.test.*
88

99
class TestCoroutineExceptionHandlerTest {
1010
@Test
11-
fun whenExceptionsCaught_avaliableViaProperty() {
11+
fun whenExceptionsCaught_availableViaProperty() {
1212
val subject = TestCoroutineExceptionHandler()
1313
val expected = IllegalArgumentException()
1414
subject.handleException(subject, expected)

0 commit comments

Comments
 (0)