diff options
author | Aleksandar Prokopec <axel22@gmail.com> | 2012-02-15 10:42:29 +0100 |
---|---|---|
committer | Aleksandar Prokopec <axel22@gmail.com> | 2012-02-15 10:42:29 +0100 |
commit | 83c584026d593b6806e1107d645606b9498c05d6 (patch) | |
tree | d9278d790c9f9c3e9aff131c9ccd236d16165caf /test | |
parent | 14f3135368b923a1f5d14d1b4f7424db22fd7f79 (diff) | |
download | scala-83c584026d593b6806e1107d645606b9498c05d6.tar.gz scala-83c584026d593b6806e1107d645606b9498c05d6.tar.bz2 scala-83c584026d593b6806e1107d645606b9498c05d6.zip |
Add `dup` method to ParCtrie iterators.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/ctries/iterator.scala | 10 |
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 + } + } } |