diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-10-20 20:20:08 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-10-20 20:20:08 +0000 |
commit | b689b912caa0e1bcd981c1a0092857ac83fb1e1d (patch) | |
tree | 194b115ae192b472baf904de14f7c61bce6af915 /test/files/scalacheck/parallel-collections/ParallelHashMapCheck.scala | |
parent | b1d9354a08107afab9c15d2ae1b8dded82b5ffef (diff) | |
download | scala-b689b912caa0e1bcd981c1a0092857ac83fb1e1d.tar.gz scala-b689b912caa0e1bcd981c1a0092857ac83fb1e1d.tar.bz2 scala-b689b912caa0e1bcd981c1a0092857ac83fb1e1d.zip |
Some serious hash tries bugs fixed.
Plus one wild goose chase and test fixes.
No review.
Diffstat (limited to 'test/files/scalacheck/parallel-collections/ParallelHashMapCheck.scala')
-rw-r--r-- | test/files/scalacheck/parallel-collections/ParallelHashMapCheck.scala | 11 |
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) + } } |