summaryrefslogtreecommitdiff
path: root/test/files/scalacheck/parallel-collections/ParallelHashMapCheck.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/scalacheck/parallel-collections/ParallelHashMapCheck.scala')
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelHashMapCheck.scala11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/files/scalacheck/parallel-collections/ParallelHashMapCheck.scala b/test/files/scalacheck/parallel-collections/ParallelHashMapCheck.scala
index 1224ec8d4d..51c35140dd 100644
--- a/test/files/scalacheck/parallel-collections/ParallelHashMapCheck.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelHashMapCheck.scala
@@ -14,7 +14,7 @@ import scala.collection._
import scala.collection.parallel.ops._
-abstract class ParallelHashMapCheck[K, V](tp: String) extends ParallelIterableCheck[(K, V)]("immutable.ParHashMap[" + tp + "]") {
+abstract class ParallelHashMapCheck[K, V](tp: String) extends ParallelMapCheck[K, V]("immutable.ParHashMap[" + tp + "]") {
ForkJoinTasks.defaultForkJoinPool.setMaximumPoolSize(Runtime.getRuntime.availableProcessors * 2)
ForkJoinTasks.defaultForkJoinPool.setParallelism(Runtime.getRuntime.availableProcessors * 2)
@@ -22,6 +22,8 @@ abstract class ParallelHashMapCheck[K, V](tp: String) extends ParallelIterableCh
def isCheckingViews = false
+ def hasStrictOrder = false
+
def instances(vals: Seq[Gen[(K, V)]]): Gen[Iterable[(K, V)]] = sized { sz =>
var hm = new immutable.HashMap[K, V]
val gen = vals(rnd.nextInt(vals.size))
@@ -53,6 +55,13 @@ with PairValues[Int, Int]
val intoperators = new IntOperators {}
def voperators = intoperators
def koperators = intoperators
+
+ override def printDataStructureDebugInfo(ds: AnyRef) = ds match {
+ case pm: ParHashMap[k, v] =>
+ pm.printDebugInfo
+ case _ =>
+ println("could not match data structure type: " + ds.getClass)
+ }
}