Skip to content

Commit da60dda

Browse files
committed
SI-8835 Iterator tests can be junit
Without loss of generality or convenience, but helps reduce the number of files in test/files and may reduce compile times for test suite. This commit includes the fix from scala#3963 and an extra test of that fix that ensures the stack doesn't grow on chained drops.
1 parent d28d4f4 commit da60dda

File tree

10 files changed

+167
-227
lines changed

10 files changed

+167
-227
lines changed

src/library/scala/collection/Iterator.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@ trait Iterator[+A] extends TraversableOnce[A] {
322322
*/
323323
def drop(n: Int): Iterator[A] = {
324324
var j = 0
325-
while (j < n && this.hasNext) {
326-
this.next
325+
while (j < n && hasNext) {
326+
next()
327327
j += 1
328328
}
329329
this

test/files/run/iterator-concat.check

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/files/run/iterator-concat.scala

Lines changed: 0 additions & 15 deletions
This file was deleted.

test/files/run/iterator-iterate-lazy.scala

Lines changed: 0 additions & 5 deletions
This file was deleted.

test/files/run/iterators.check

Lines changed: 0 additions & 14 deletions
This file was deleted.

test/files/run/iterators.scala

Lines changed: 0 additions & 168 deletions
This file was deleted.

test/files/run/t3516.check

Lines changed: 0 additions & 3 deletions
This file was deleted.

test/files/run/t3516.scala

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)