Skip to content

Commit 7c8a8dc

Browse files
committed
Fix put and putAll preserving map instance in case of no-operation.
1 parent fab87aa commit 7c8a8dc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

kotlinx-collections-immutable/tests/src/test/kotlin/kotlinx.collections.immutable/ImmutableMapTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ abstract class ImmutableMapTest {
139139
with(map) {
140140
testNoOperation({ remove("y") }, { remove("y") })
141141
testNoOperation({ remove("x", 2) }, { remove("x", 2) })
142-
// testNoOperation({ put("x", 1) }, { put("x", 1) }) // does not hold
143-
// testNoOperation({ putAll(this) }, { putAll(this) }) // does not hold
142+
testNoOperation({ put("x", 1) }, { put("x", 1) }) // does not hold
143+
testNoOperation({ putAll(this) }, { putAll(this) }) // does not hold
144144
testNoOperation({ putAll(emptyMap()) }, { putAll(emptyMap()) })
145145
}
146146
}

0 commit comments

Comments
 (0)