Home
last modified time | relevance | path

Searched refs:StandardTestDispatcher (Results 1 – 21 of 21) sorted by relevance

/external/jetpack-camera-app/feature/preview/src/test/java/com/google/jetpackcamera/feature/preview/
DPreviewViewModelTest.kt28 import kotlinx.coroutines.test.StandardTestDispatcher in <lambda>()
50 fun setup() = runTest(StandardTestDispatcher()) { in <lambda>()
51 Dispatchers.setMain(StandardTestDispatcher()) in <lambda>()
63 fun getPreviewUiState() = runTest(StandardTestDispatcher()) { in <lambda>()
70 fun runCamera() = runTest(StandardTestDispatcher()) { in <lambda>()
77 fun captureImageWithUri() = runTest(StandardTestDispatcher()) { in <lambda>()
86 fun startVideoRecording() = runTest(StandardTestDispatcher()) { in <lambda>()
94 fun stopVideoRecording() = runTest(StandardTestDispatcher()) { in <lambda>()
104 fun setFlash() = runTest(StandardTestDispatcher()) { in <lambda>()
115 fun flipCamera() = runTest(StandardTestDispatcher()) { in <lambda>()
DScreenFlashTest.kt29 import kotlinx.coroutines.test.StandardTestDispatcher
45 private val testDispatcher = StandardTestDispatcher(testScope.testScheduler)
/external/jetpack-camera-app/feature/settings/src/androidTest/java/com/google/jetpackcamera/settings/
DCameraAppSettingsViewModelTest.kt36 import kotlinx.coroutines.test.StandardTestDispatcher
52 fun setup() = runTest(StandardTestDispatcher()) { in <lambda>()
53 Dispatchers.setMain(StandardTestDispatcher()) in <lambda>()
84 fun getSettingsUiState() = runTest(StandardTestDispatcher()) { in <lambda>()
98 fun setMute_permission_granted() = runTest(StandardTestDispatcher()) { in <lambda>()
123 fun setMute_permission_not_granted() = runTest(StandardTestDispatcher()) { in setMute_permission_not_granted()
144 fun setDefaultToFrontCamera() = runTest(StandardTestDispatcher()) { in <lambda>()
167 fun setDarkMode() = runTest(StandardTestDispatcher()) { in <lambda>()
/external/kotlinx.coroutines/kotlinx-coroutines-test/common/test/
DStandardTestDispatcherTest.kt10 private val scope = TestScope(StandardTestDispatcher()) in <lambda>()
65 val dispatcher1 = StandardTestDispatcher() in <lambda>()
68 val dispatcher2 = StandardTestDispatcher() in <lambda>()
DTestScopeTest.kt33 val dispatcher = StandardTestDispatcher() in <lambda>()
47 val dispatcher = StandardTestDispatcher(scheduler) in <lambda>()
60 val mainDispatcher = StandardTestDispatcher(scheduler) in <lambda>()
72 val mainDispatcher = StandardTestDispatcher() in <lambda>()
554StandardTestDispatcher() + TestCoroutineScheduler(), // the dispatcher is not linked to the schedu… in <lambda>()
DTestCoroutineSchedulerTest.kt16 withContext(StandardTestDispatcher()) { in <lambda>()
328 StandardTestDispatcher(), in forTestDispatchers()
DTestDispatchersTest.kt13 Dispatchers.setMain(StandardTestDispatcher()) in setUp()
DRunTestTest.kt61 val job = launch(StandardTestDispatcher(testScheduler)) { in <lambda>()
263 val dispatcher = StandardTestDispatcher(testScheduler) in <lambda>()
DUnconfinedTestDispatcherTest.kt153 val dispatcher1 = StandardTestDispatcher() in <lambda>()
/external/kotlinx.coroutines/kotlinx-coroutines-test/jvm/test/migration/
DTestCoroutineScopeTest.kt32 val dispatcher = StandardTestDispatcher() in <lambda>()
46 val dispatcher = StandardTestDispatcher(scheduler) in <lambda>()
54 val mainDispatcher = StandardTestDispatcher(scheduler) in <lambda>()
66 val mainDispatcher = StandardTestDispatcher() in <lambda>()
213StandardTestDispatcher() + TestCoroutineScheduler(), // the dispatcher is not linked to the schedu… in <lambda>()
DRunTestLegacyScopeTest.kt56 val job = launch(StandardTestDispatcher(testScheduler)) { in <lambda>()
143 val dispatcher = StandardTestDispatcher(testScheduler) in <lambda>()
DRunBlockingTestOnTestScopeTest.kt46 val dispatcher = StandardTestDispatcher(testScheduler) in <lambda>()
/external/kotlinx.coroutines/kotlinx-coroutines-test/common/src/
DTestCoroutineDispatchers.kt138 public fun StandardTestDispatcher( in StandardTestDispatcher() method
153 override fun toString(): String = "${name ?: "StandardTestDispatcher"}[scheduler=$scheduler]" in StandardTestDispatcher()
DTestScope.kt196 null -> StandardTestDispatcher(get(TestCoroutineScheduler)) in withDelaySkipping()
/external/kotlinx.coroutines/kotlinx-coroutines-test/
DMIGRATION.md46 * Both a simple `StandardTestDispatcher` that is always paused, and unconfined `UnconfinedTestDispa…
102 ## Replace usages of pauseDispatcher and resumeDispatcher with a StandardTestDispatcher
105 `withContext(StandardTestDispatcher(testScheduler))`
114 or pass a `StandardTestDispatcher` as an argument to `runBlockingTest`.
115 …This will lead to the test using a `StandardTestDispatcher`, which does not allow pausing and resu…
119 …a `withContext(StandardTestDispatcher(testScheduler))` block, or try using some other combinations…
120 …`StandardTestDispatcher` (where dispatches are needed) and `UnconfinedTestDispatcher` (where it is…
145 ### It uses StandardTestDispatcher by default, not TestCoroutineDispatcher.
170 If the `TestCoroutineDispatcher()` is simply removed, `StandardTestDispatcher()` will be used, whic…
388 ## Replace TestCoroutineDispatcher with UnconfinedTestDispatcher and StandardTestDispatcher
[all …]
DREADME.md21 | [StandardTestDispatcher] | A simple dispatcher with no special behavior other than being linked t…
240 val dispatcher1 = StandardTestDispatcher(scheduler, name = "IO dispatcher")
241 val dispatcher2 = StandardTestDispatcher(scheduler, name = "Background dispatcher")
284 Dispatchers.setMain(StandardTestDispatcher(scope.testScheduler))
355 …utes on the correct thread, then simply `launch` a new coroutine with the [StandardTestDispatcher].
367 launch(StandardTestDispatcher(testScheduler)) {
444 [StandardTestDispatcher]: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-test/kot…
/external/jetpack-camera-app/core/camera/src/test/java/com/google/jetpackcamera/core/camera/test/
DFakeCameraUseCaseTest.kt28 import kotlinx.coroutines.test.StandardTestDispatcher
42 private val testDispatcher = StandardTestDispatcher(testScope.testScheduler)
/external/jetpack-camera-app/data/settings/src/androidTest/java/com/google/jetpackcamera/settings/
DLocalSettingsRepositoryInstrumentedTest.kt39 import kotlinx.coroutines.test.StandardTestDispatcher
64 Dispatchers.setMain(StandardTestDispatcher()) in <lambda>()
/external/kotlinx.coroutines/kotlinx-coroutines-test/jvm/test/
DMultithreadingTest.kt105 val job = launch(StandardTestDispatcher(scheduler)) { in <lambda>()
/external/kotlinx.coroutines/kotlinx-coroutines-test/api/
Dkotlinx-coroutines-test.klib.api58StandardTestDispatcher(kotlinx.coroutines.test/TestCoroutineScheduler? = ..., kotlin/String? = ...…
Dkotlinx-coroutines-test.api38 …public static final fun StandardTestDispatcher (Lkotlinx/coroutines/test/TestCoroutineScheduler;Lj…
39 …public static synthetic fun StandardTestDispatcher$default (Lkotlinx/coroutines/test/TestCoroutine…