Adapted usage of failsWith().

This commit is contained in:
Evgeny Gerashchenko
2013-01-29 20:43:36 +04:00
parent 719ed4c795
commit dd4b508213
7 changed files with 54 additions and 54 deletions
@@ -2,7 +2,7 @@ package iterators
import kotlin.test.assertEquals
import org.junit.Test as test
import kotlin.test.failsWith
import kotlin.test.fails
fun fibonacci(): Iterator<Int> {
// fibonacci terms
@@ -66,7 +66,7 @@ class IteratorsTest {
val iterWithNulls = arrayList("foo", null, "bar").iterator()
val notNull2 = iterWithNulls.requireNoNulls()
failsWith<IllegalArgumentException> {
fails {
// should throw an exception as we have a null
notNull2.toList()
}