summaryrefslogtreecommitdiff
path: root/test/files/scalacheck/parallel-collections/ParallelHashSetCheck.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/scalacheck/parallel-collections/ParallelHashSetCheck.scala')
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelHashSetCheck.scala11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/files/scalacheck/parallel-collections/ParallelHashSetCheck.scala b/test/files/scalacheck/parallel-collections/ParallelHashSetCheck.scala
index 8b41908a26..91de2472a7 100644
--- a/test/files/scalacheck/parallel-collections/ParallelHashSetCheck.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelHashSetCheck.scala
@@ -24,6 +24,8 @@ abstract class ParallelHashSetCheck[T](tp: String) extends ParallelSetCheck[T]("
def hasStrictOrder = false
+ def tasksupport: TaskSupport
+
def ofSize(vals: Seq[Gen[T]], sz: Int) = {
val hm = new mutable.HashSet[T]
val gen = vals(rnd.nextInt(vals.size))
@@ -32,19 +34,20 @@ abstract class ParallelHashSetCheck[T](tp: String) extends ParallelSetCheck[T]("
}
def fromTraversable(t: Traversable[T]) = {
- val phm = new ParHashSet[T]
+ val phs = new ParHashSet[T]
+ phs.tasksupport = tasksupport
var i = 0
for (kv <- t.toList) {
- phm += kv
+ phs += kv
i += 1
}
- phm
+ phs
}
}
-object IntParallelHashSetCheck extends ParallelHashSetCheck[Int]("Int")
+class IntParallelHashSetCheck(val tasksupport: TaskSupport) extends ParallelHashSetCheck[Int]("Int")
with IntOperators
with IntValues
{