dave08
04/05/2022, 7:11 AMexpectThat(result) {
size.isEqualTo(4)
withElementAt(3) {
...
I get this:
Mapping 'element at index 3 %s' failed with: Index 3 out of bounds for length 3
Mapping 'element at index 3 %s' failed with: Index 3 out of bounds for length 3
at app//strikt.internal.AssertionBuilder.with(AssertionBuilder.kt:138)
at app//strikt.assertions.IterableKt.withElementAt(Iterable.kt:70)
Whereas I would have expected the size.isEqualTo(4)
would give me the size of the array BEFORE crashing on an out of bounds error... or even better, for soft-expectations, maybe not crash at all? Just give an x
just like any other failed assertion at the appropriate level?robfletcher
04/05/2022, 5:15 PMhasSize(4).elementAt(3)…
it would short circuit