Package-level declarations
Types
Control the virtual clock time of a CoroutineDispatcher.
CoroutineDispatcher that performs both immediate and lazy execution of coroutines in tests and uses a TestCoroutineScheduler to control its virtual clock.
An exception handler that captures uncaught exceptions in tests.
This is a scheduler for coroutines used in tests, providing the delay-skipping behavior.
A scope which provides detailed control over the execution of coroutines for tests.
A test dispatcher that can interface with a TestCoroutineScheduler.
A test result.
A coroutine scope that for launching test coroutines.
Access uncaught coroutine exceptions captured during test execution.
Functions
Moves the virtual clock of this dispatcher forward by the specified amount, running the scheduled tasks in the meantime.
Advances the testScheduler by delayTimeMillis and runs the tasks up to that moment (inclusive).
Advances the testScheduler to the point where there are no tasks remaining.
Advances the testScheduler to the point where there are no tasks remaining.
A coroutine scope for launching test coroutines.
Resets state of the Dispatchers.Main to the original main dispatcher.
Convenience method for calling runBlockingTest on an existing TestCoroutineDispatcher.
Convenience method for calling runBlockingTest on an existing TestCoroutineScope.
Convenience method for calling runBlockingTestOnTestScope on an existing TestScope.
Executes a testBody inside an immediate execution dispatcher.
A version of runBlockingTest that works with TestScope.
Run any tasks that are pending at the current virtual time, according to the testScheduler.
Run any tasks that are pending at the current virtual time, according to the testScheduler.
Executes testBody as a test in a new coroutine, returning TestResult.
Runs a test in a TestCoroutineScope based on this one.
This is an overload of runTest that works with TestCoroutineScope.
Sets the given dispatcher as an underlying dispatcher of Dispatchers.Main. All subsequent usages of Dispatchers.Main will use the given dispatcher under the hood.
Creates an instance of a TestDispatcher whose tasks are run inside calls to the scheduler.
A coroutine scope for launching test coroutines using TestCoroutineDispatcher.
Creates a TestScope.
Creates an instance of an unconfined TestDispatcher.
Properties
The current virtual time on testScheduler.