20b122c1dd
(and in jvm-only and js-only tests also)
15 lines
289 B
Kotlin
15 lines
289 B
Kotlin
package test.collections
|
|
|
|
import kotlin.test.*
|
|
|
|
class IteratorsTest {
|
|
@Test fun iterationOverIterator() {
|
|
val c = listOf(0, 1, 2, 3, 4, 5)
|
|
var s = ""
|
|
for (i in c.iterator()) {
|
|
s = s + i.toString()
|
|
}
|
|
assertEquals("012345", s)
|
|
}
|
|
}
|