mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-26 02:27:14 +00:00
refactor
This commit is contained in:
parent
8820da342b
commit
99982dbdad
@ -7,12 +7,6 @@ import kotlin.test.assertTrue
|
|||||||
|
|
||||||
class MapDiffUtilsTests {
|
class MapDiffUtilsTests {
|
||||||
|
|
||||||
private fun <K, V> compareFun(wasCalled: BooleanArray): (K, V, V) -> Boolean = { _, a, b ->
|
|
||||||
wasCalled[0] = true
|
|
||||||
a != b
|
|
||||||
}
|
|
||||||
private val compareFunWasCalled = booleanArrayOf(false)
|
|
||||||
|
|
||||||
private val originalMap = mapOf(
|
private val originalMap = mapOf(
|
||||||
"a" to 1,
|
"a" to 1,
|
||||||
"b" to 2,
|
"b" to 2,
|
||||||
@ -61,6 +55,12 @@ class MapDiffUtilsTests {
|
|||||||
newMapAdded.second,
|
newMapAdded.second,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
private val compareFunWasCalled = booleanArrayOf(false)
|
||||||
|
|
||||||
|
private fun <K, V> compareFun(wasCalled: BooleanArray): (K, V, V) -> Boolean = { _, a, b ->
|
||||||
|
wasCalled[0] = true
|
||||||
|
a != b
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testMapDiffRemoved() {
|
fun testMapDiffRemoved() {
|
||||||
|
Loading…
Reference in New Issue
Block a user