test(worldclock): make the seconds tests mean what they say
The no-re-emission check now waits for the write to be readable before asserting, and the seconds switch has its own settings test instead of riding in the clock-defaults one. WorldClockSource.state takes its refresh signal without a default, and ARCHITECTURE.md's slice count and alignedTicks guarantee match the code.
This commit is contained in:
1 parent
78da94d775
commit
d70d0c78da
4 files changed
+25
-8
No files matched your search
@@ -15,7 +15,6 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.combine
|
||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||
import kotlinx.coroutines.flow.emptyFlow
|
||||
import kotlinx.coroutines.flow.flatMapLatest
|
||||
import kotlinx.coroutines.flow.flow
|
||||
import kotlinx.coroutines.flow.map
|
||||
@@ -64,7 +63,7 @@ internal class WorldClockSource @Inject constructor(
|
||||
* state and `distinctUntilChanged` only drops the odd early wake (D18).
|
||||
*/
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
fun state(refreshes: Flow<Unit> = emptyFlow()): Flow<WorldClockUiState.Loaded> =
|
||||
fun state(refreshes: Flow<Unit>): Flow<WorldClockUiState.Loaded> =
|
||||
combine(
|
||||
worldClocks.worldClocks(),
|
||||
storedHomeZoneId,
|
||||
|
||||
Reference in new issue
Block a user