Skip to content

Commit ee9adff

Browse files
committed
Reformat
1 parent 5509e90 commit ee9adff

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

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

+23-12
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
1313
* Testing libraries may expose this interface to the tests instead of [TestCoroutineDispatcher].
1414
*/
1515
@ExperimentalCoroutinesApi
16-
@Deprecated("Use `TestCoroutineScheduler` to control virtual time.",
17-
level = DeprecationLevel.WARNING)
16+
@Deprecated(
17+
"Use `TestCoroutineScheduler` to control virtual time.",
18+
level = DeprecationLevel.WARNING
19+
)
1820
public interface DelayController {
1921
/**
2022
* Returns the current virtual clock-time as it is known to this Dispatcher.
@@ -123,20 +125,25 @@ public interface DelayController {
123125
public fun resumeDispatcher()
124126
}
125127

126-
internal interface SchedulerAsDelayController: DelayController {
128+
internal interface SchedulerAsDelayController : DelayController {
127129
public val scheduler: TestCoroutineScheduler
128130

129131
/** @suppress */
130-
@Deprecated("This property delegates to the test scheduler, which may cause confusing behavior unless made explicit.",
132+
@Deprecated(
133+
"This property delegates to the test scheduler, which may cause confusing behavior unless made explicit.",
131134
ReplaceWith("this.scheduler.currentTime"),
132-
level = DeprecationLevel.WARNING)
133-
override val currentTime: Long get() = scheduler.currentTime
135+
level = DeprecationLevel.WARNING
136+
)
137+
override val currentTime: Long
138+
get() = scheduler.currentTime
134139

135140

136141
/** @suppress */
137-
@Deprecated("This function delegates to the test scheduler, which may cause confusing behavior unless made explicit.",
142+
@Deprecated(
143+
"This function delegates to the test scheduler, which may cause confusing behavior unless made explicit.",
138144
ReplaceWith("this.scheduler.apply { advanceTimeBy(delayTimeMillis); runCurrent() }"),
139-
level = DeprecationLevel.WARNING)
145+
level = DeprecationLevel.WARNING
146+
)
140147
override fun advanceTimeBy(delayTimeMillis: Long): Long {
141148
val oldTime = scheduler.currentTime
142149
scheduler.advanceTimeBy(delayTimeMillis)
@@ -145,19 +152,23 @@ internal interface SchedulerAsDelayController: DelayController {
145152
}
146153

147154
/** @suppress */
148-
@Deprecated("This function delegates to the test scheduler, which may cause confusing behavior unless made explicit.",
155+
@Deprecated(
156+
"This function delegates to the test scheduler, which may cause confusing behavior unless made explicit.",
149157
ReplaceWith("this.scheduler.advanceUntilIdle()"),
150-
level = DeprecationLevel.WARNING)
158+
level = DeprecationLevel.WARNING
159+
)
151160
override fun advanceUntilIdle(): Long {
152161
val oldTime = scheduler.currentTime
153162
scheduler.advanceUntilIdle()
154163
return scheduler.currentTime - oldTime
155164
}
156165

157166
/** @suppress */
158-
@Deprecated("This function delegates to the test scheduler, which may cause confusing behavior unless made explicit.",
167+
@Deprecated(
168+
"This function delegates to the test scheduler, which may cause confusing behavior unless made explicit.",
159169
ReplaceWith("this.scheduler.runCurrent()"),
160-
level = DeprecationLevel.WARNING)
170+
level = DeprecationLevel.WARNING
171+
)
161172
override fun runCurrent(): Unit = scheduler.runCurrent()
162173

163174
/** @suppress */

0 commit comments

Comments
 (0)