diff --git a/src/commonTest/kotlin/com/hoc081098/flowext/MapStateTest.kt b/src/commonTest/kotlin/com/hoc081098/flowext/MapStateTest.kt index 9af00ba3..e72778a3 100644 --- a/src/commonTest/kotlin/com/hoc081098/flowext/MapStateTest.kt +++ b/src/commonTest/kotlin/com/hoc081098/flowext/MapStateTest.kt @@ -25,7 +25,7 @@ package com.hoc081098.flowext import com.hoc081098.flowext.utils.BaseTest -import com.hoc081098.flowext.utils.asserReadonlyStateFlow +import com.hoc081098.flowext.utils.assertReadonlyStateFlow import com.hoc081098.flowext.utils.test import kotlin.math.abs import kotlin.test.Test @@ -44,7 +44,7 @@ class MapStateTest : BaseTest() { val source = MutableStateFlow(1) val mapped: StateFlow = source.mapState { abs(it) + 1 } - asserReadonlyStateFlow(mapped, 42) + assertReadonlyStateFlow(mapped, 42) launch { mapped diff --git a/src/commonTest/kotlin/com/hoc081098/flowext/utils/BaseTest.kt b/src/commonTest/kotlin/com/hoc081098/flowext/utils/BaseTest.kt index 06d227ed..9ea522c9 100644 --- a/src/commonTest/kotlin/com/hoc081098/flowext/utils/BaseTest.kt +++ b/src/commonTest/kotlin/com/hoc081098/flowext/utils/BaseTest.kt @@ -94,7 +94,7 @@ suspend inline fun assertFailsWith( suspend fun Flow.sum() = fold(0) { acc, value -> acc + value } -inline fun asserReadonlyStateFlow(stateFlow: StateFlow, value: T) { +inline fun assertReadonlyStateFlow(stateFlow: StateFlow, value: T) { assertFalse { stateFlow is MutableStateFlow } assertFails { (stateFlow as MutableStateFlow).value = value } }