I'd like to find a nice and concise way to test intarray
at first I tried
mFaces[0].mIndices shouldBe intArrayOf(0, 1, 2)
where mIndices
is
var mIndices: IntArray = IntArray(0)
but fails. Intellij also suggests me to override equals()
with Array
s
Then I wanted to try something like this
mFaces[0].mIndices.all { it. == index } shouldBe true
but it looks like there is no way to retrieve the index of it
inside all{..}
or is this
var p = 0
mFaces[0].mIndices.all { it == p++ } shouldBe true
the only possibility?