Test fix: java6 doesn't throw on invalid AbstractMutableList.addAll index
If the collection of elements to be added is empty, java6 implementation
of AbstractMutableList.addAll doesn't throw on invalid index.
The failing test was introduced in 59031543e2
which fixed #KT-47211.
This commit is contained in:
committed by
Space
parent
a908e5576d
commit
47aa04d55d
@@ -6,6 +6,7 @@
|
||||
package test.collections
|
||||
|
||||
import test.collections.behaviors.*
|
||||
import test.testOnNonJvm6And7
|
||||
import kotlin.test.*
|
||||
|
||||
class AbstractCollectionsTest {
|
||||
@@ -127,7 +128,9 @@ class AbstractCollectionsTest {
|
||||
|
||||
assertEquals(listOf("ok", "element"), list)
|
||||
|
||||
assertFailsWith<IndexOutOfBoundsException> { list.addAll(-1, listOf()) }
|
||||
testOnNonJvm6And7 {
|
||||
assertFailsWith<IndexOutOfBoundsException> { list.addAll(-1, listOf()) }
|
||||
}
|
||||
|
||||
compare(list.storage, list) {
|
||||
listBehavior()
|
||||
|
||||
Reference in New Issue
Block a user