Compare commits

...

1 Commits

Author SHA1 Message Date
Ilya Gorbunov
1ee39e87e9 Add a test ensuring mutable map preserves iteration order after update 2020-10-30 20:11:06 +03:00

View File

@@ -309,7 +309,8 @@ class MapTest {
@Test fun createMutableMap() {
val map = mutableMapOf("b" to 1, "c" to 2)
map.put("a", 3)
assertEquals(listOf("b" to 1, "c" to 2, "a" to 3), map.toList())
map["b"] = 0
assertEquals(listOf("b" to 0, "c" to 2, "a" to 3), map.toList())
}
@Test fun createLinkedMap() {