https://kotlinlang.org logo
#android
Title
# android
i

izacus

05/16/2017, 1:19 PM
I'm fighting Hamcrest matchers where
assertThat(list, IsIterableContainingInOrder.contains(anotherList))
doesn't make the compiler type resolver happy.
stackoverflow 1
t

tgirard12

05/17/2017, 7:47 AM
izacus: I use this custom fun :
infix fun <E, T : List<E>> T?.mustEqualTo(theOther: List<E>) = Assert.assertEquals(theOther, this)
=>
myList mustEqualTo listOf("1", "2")
13 Views