summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorAleksandar Prokopec <axel22@gmail.com>2012-02-15 10:42:29 +0100
committerAleksandar Prokopec <axel22@gmail.com>2012-02-15 10:42:29 +0100
commit83c584026d593b6806e1107d645606b9498c05d6 (patch)
treed9278d790c9f9c3e9aff131c9ccd236d16165caf /test/files/run
parent14f3135368b923a1f5d14d1b4f7424db22fd7f79 (diff)
downloadscala-83c584026d593b6806e1107d645606b9498c05d6.tar.gz
scala-83c584026d593b6806e1107d645606b9498c05d6.tar.bz2
scala-83c584026d593b6806e1107d645606b9498c05d6.zip
Add `dup` method to ParCtrie iterators.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/ctries/iterator.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/run/ctries/iterator.scala b/test/files/run/ctries/iterator.scala
index 4bbf9009f0..85a6ab7623 100644
--- a/test/files/run/ctries/iterator.scala
+++ b/test/files/run/ctries/iterator.scala
@@ -274,6 +274,16 @@ object IteratorSpec extends Spec {
while (it.hasNext) it.next()
}
+ "be duplicated" in {
+ val sz = 50
+ val ct = collection.parallel.mutable.ParCtrie((0 until sz) zip (0 until sz): _*)
+ val it = ct.splitter
+ for (_ <- 0 until (sz / 2)) it.next()
+ val dupit = it.dup
+
+ it.toList shouldEqual dupit.toList
+ }
+
}
}