Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2366ddbe authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update Kosmos Fixtures for CoroutineContext" into main

parents e52b1908 3ca3c472
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -57,12 +57,10 @@ fun Kosmos.useUnconfinedTestDispatcher() = apply { testDispatcher = UnconfinedTe

var Kosmos.testScope by Fixture { TestScope(testDispatcher) }
var Kosmos.backgroundScope by Fixture { testScope.backgroundScope }
var Kosmos.applicationCoroutineScope by Fixture { backgroundScope }
var Kosmos.applicationCoroutineScope by Fixture { testScope.backgroundScope }
var Kosmos.testCase: SysuiTestCase by Fixture()
var Kosmos.backgroundCoroutineContext: CoroutineContext by Fixture {
    backgroundScope.coroutineContext
}
var Kosmos.mainCoroutineContext: CoroutineContext by Fixture { testScope.coroutineContext }
var Kosmos.backgroundCoroutineContext: CoroutineContext by Fixture { testDispatcher }
var Kosmos.mainCoroutineContext: CoroutineContext by Fixture { testDispatcher }

/**
 * Run this test body with a [Kosmos] as receiver, and using the [testScope] currently installed in