assertk
assertk copied to clipboard
containsSubList throws ArrayIndexOutOfBoundsException
trafficstars
There are cases where containsSubList throws an ArrayIndexOutOfBoundsException instead of an AssertionError, leading to confusing test failures. For example:
assertThat(listOf(3, 1, 2)).containsSubList(listOf(1, 2, 3))
Index 3 out of bounds for length 3
java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3
at java.base/java.util.Arrays$ArrayList.get(Arrays.java:4164)
at assertk.assertions.ListKt.containsSubList(list.kt:77)
It looks like this has been fixed? Do you have an ETA on a new release? Thanks!
Sorry for the late reply, this has been released