1
- @file:Suppress(" DEPRECATION" )
1
+ @file:Suppress(" DEPRECATION" , " DEPRECATION_ERROR " )
2
2
@file:JvmName(" TestBuildersKt" )
3
3
@file:JvmMultifileClass
4
4
@@ -51,9 +51,9 @@ import kotlin.time.Duration.Companion.milliseconds
51
51
" Use `runTest` instead to support completing from other dispatchers. " +
52
52
" Please see the migration guide for details: " +
53
53
" https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-test/MIGRATION.md" ,
54
- level = DeprecationLevel .WARNING
54
+ level = DeprecationLevel .ERROR
55
55
)
56
- // Since 1.6.0, kept as warning in 1.7.0, ERROR in 1.8 .0 and removed as experimental in 1.9.0
56
+ // Since 1.6.0, kept as warning in 1.7.0, ERROR in 1.9 .0 and removed as experimental later
57
57
public fun runBlockingTest (
58
58
context : CoroutineContext = EmptyCoroutineContext ,
59
59
testBody : suspend TestCoroutineScope .() -> Unit
@@ -73,8 +73,8 @@ public fun runBlockingTest(
73
73
/* *
74
74
* A version of [runBlockingTest] that works with [TestScope].
75
75
*/
76
- @Deprecated(" Use `runTest` instead to support completing from other dispatchers." , level = DeprecationLevel .WARNING )
77
- // Since 1.6.0, kept as warning in 1.7.0, ERROR in 1.8 .0 and removed as experimental in 1.9.0
76
+ @Deprecated(" Use `runTest` instead to support completing from other dispatchers." , level = DeprecationLevel .ERROR )
77
+ // Since 1.6.0, kept as warning in 1.7.0, ERROR in 1.9 .0 and removed as experimental later
78
78
public fun runBlockingTestOnTestScope (
79
79
context : CoroutineContext = EmptyCoroutineContext ,
80
80
testBody : suspend TestScope .() -> Unit
@@ -121,17 +121,17 @@ public fun runBlockingTestOnTestScope(
121
121
" Use `runTest` instead to support completing from other dispatchers. " +
122
122
" Please see the migration guide for details: " +
123
123
" https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-test/MIGRATION.md" ,
124
- level = DeprecationLevel .WARNING
124
+ level = DeprecationLevel .ERROR
125
125
)
126
- // Since 1.6.0, kept as warning in 1.7.0, ERROR in 1.8 .0 and removed as experimental in 1.9.0
126
+ // Since 1.6.0, kept as warning in 1.7.0, ERROR in 1.9 .0 and removed as experimental later
127
127
public fun TestCoroutineScope.runBlockingTest (block : suspend TestCoroutineScope .() -> Unit ): Unit =
128
128
runBlockingTest(coroutineContext, block)
129
129
130
130
/* *
131
131
* Convenience method for calling [runBlockingTestOnTestScope] on an existing [TestScope].
132
132
*/
133
- @Deprecated(" Use `runTest` instead to support completing from other dispatchers." , level = DeprecationLevel .WARNING )
134
- // Since 1.6.0, kept as warning in 1.7.0, ERROR in 1.8 .0 and removed as experimental in 1.9.0
133
+ @Deprecated(" Use `runTest` instead to support completing from other dispatchers." , level = DeprecationLevel .ERROR )
134
+ // Since 1.6.0, kept as warning in 1.7.0, ERROR in 1.9 .0 and removed as experimental later
135
135
public fun TestScope.runBlockingTest (block : suspend TestScope .() -> Unit ): Unit =
136
136
runBlockingTestOnTestScope(coroutineContext, block)
137
137
@@ -147,18 +147,18 @@ public fun TestScope.runBlockingTest(block: suspend TestScope.() -> Unit): Unit
147
147
" Use `runTest` instead to support completing from other dispatchers. " +
148
148
" Please see the migration guide for details: " +
149
149
" https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-test/MIGRATION.md" ,
150
- level = DeprecationLevel .WARNING
150
+ level = DeprecationLevel .ERROR
151
151
)
152
- // Since 1.6.0, kept as warning in 1.7.0, ERROR in 1.8 .0 and removed as experimental in 1.9.0
152
+ // Since 1.6.0, kept as warning in 1.7.0, ERROR in 1.9 .0 and removed as experimental later
153
153
public fun TestCoroutineDispatcher.runBlockingTest (block : suspend TestCoroutineScope .() -> Unit ): Unit =
154
154
runBlockingTest(this , block)
155
155
156
156
/* *
157
157
* This is an overload of [runTest] that works with [TestCoroutineScope].
158
158
*/
159
159
@ExperimentalCoroutinesApi
160
- @Deprecated(" Use `runTest` instead." , level = DeprecationLevel .WARNING )
161
- // Since 1.6.0, kept as warning in 1.7.0, ERROR in 1.8 .0 and removed as experimental in 1.9.0
160
+ @Deprecated(" Use `runTest` instead." , level = DeprecationLevel .ERROR )
161
+ // Since 1.6.0, kept as warning in 1.7.0, ERROR in 1.9 .0 and removed as experimental later
162
162
public fun runTestWithLegacyScope (
163
163
context : CoroutineContext = EmptyCoroutineContext ,
164
164
dispatchTimeoutMs : Long = DEFAULT_DISPATCH_TIMEOUT_MS ,
@@ -196,8 +196,8 @@ public fun runTestWithLegacyScope(
196
196
* immediately from the test body. See the docs for [TestResult] for details.
197
197
*/
198
198
@ExperimentalCoroutinesApi
199
- @Deprecated(" Use `TestScope.runTest` instead." , level = DeprecationLevel .WARNING )
200
- // Since 1.6.0, kept as warning in 1.7.0, ERROR in 1.8 .0 and removed as experimental in 1.9.0
199
+ @Deprecated(" Use `TestScope.runTest` instead." , level = DeprecationLevel .ERROR )
200
+ // Since 1.6.0, kept as warning in 1.7.0, ERROR in 1.9 .0 and removed as experimental later
201
201
public fun TestCoroutineScope.runTest (
202
202
dispatchTimeoutMs : Long = DEFAULT_DISPATCH_TIMEOUT_MS ,
203
203
block : suspend TestCoroutineScope .() -> Unit
0 commit comments