#KT-1391 Fixed

This commit is contained in:
James Strachan
2012-04-03 10:40:21 +01:00
parent 28b0792191
commit 153b668d3e
13 changed files with 143 additions and 42 deletions
+12
View File
@@ -271,6 +271,18 @@ class CollectionTest {
*/
}
test fun requireNoNulls() {
val data = arrayList<String?>("foo", "bar")
val notNull = data.requireNoNulls()
assertEquals(arrayList("foo", "bar"), notNull)
val hasNulls = arrayList("foo", null, "bar")
failsWith<IllegalArgumentException> {
// should throw an exception as we have a null
hasNulls.requireNoNulls()
}
}
test fun reverse() {
val data = arrayList("foo", "bar")
val rev = data.reverse()