Skip to content

Commit db50e6f

Browse files
committed
Do not use JDK8 list methods in tests
1 parent b6ee222 commit db50e6f

File tree

1 file changed

+3
-2
lines changed
  • kotlinx-collections-immutable/tests/src/test/kotlin/kotlinx.collections.immutable

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ class ImmutableListTest {
124124
val subList = builder.subList(2, 5)
125125
builder[4] = 'b'
126126
assertEquals("cxb", subList.joinToString(""))
127-
subList.replaceAll { it -> it + 1 }
128-
assertEquals("abdycxyz12", builder.joinToString(""))
127+
subList.removeAt(0)
128+
assertEquals("xb", subList.joinToString(""))
129+
assertEquals("abxbxyz12", builder.joinToString(""))
129130
}
130131

131132
fun <T> ImmutableList<T>.testMutation(operation: MutableList<T>.() -> Unit) {

0 commit comments

Comments
 (0)