summaryrefslogtreecommitdiff
path: root/test/files/scalacheck
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-03-27 15:41:15 -0700
committerPaul Phillips <paulp@improving.org>2012-03-27 15:41:15 -0700
commit61c36b59907a7824628ced70ccaed2f9cf4a5a56 (patch)
tree3d145d60f92ad25ec8643534ae944ae697d84908 /test/files/scalacheck
parent2b90e85b68fca963ae66106d1ff1c21b1428056f (diff)
parent37b6b48b5fabb804ec02d762df7d83577ccad2ac (diff)
downloadscala-61c36b59907a7824628ced70ccaed2f9cf4a5a56.tar.gz
scala-61c36b59907a7824628ced70ccaed2f9cf4a5a56.tar.bz2
scala-61c36b59907a7824628ced70ccaed2f9cf4a5a56.zip
Merge remote-tracking branch 'axel22/feature/collection-concurrent' into develop
Diffstat (limited to 'test/files/scalacheck')
-rw-r--r--test/files/scalacheck/Ctrie.scala14
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelCtrieCheck.scala8
2 files changed, 11 insertions, 11 deletions
diff --git a/test/files/scalacheck/Ctrie.scala b/test/files/scalacheck/Ctrie.scala
index b9d71b88a3..736bf938bc 100644
--- a/test/files/scalacheck/Ctrie.scala
+++ b/test/files/scalacheck/Ctrie.scala
@@ -5,7 +5,7 @@ import org.scalacheck._
import Prop._
import org.scalacheck.Gen._
import collection._
-import collection.mutable.ConcurrentTrieMap
+import collection.concurrent.TrieMap
@@ -16,7 +16,7 @@ case class Wrap(i: Int) {
/** A check mainly oriented towards checking snapshot correctness.
*/
-object Test extends Properties("ConcurrentTrieMap") {
+object Test extends Properties("concurrent.TrieMap") {
/* generators */
@@ -102,7 +102,7 @@ object Test extends Properties("ConcurrentTrieMap") {
(numThreads, numElems) =>
val p = 3 //numThreads
val sz = 102 //numElems
- val ct = new ConcurrentTrieMap[Wrap, Int]
+ val ct = new TrieMap[Wrap, Int]
// checker
val checker = spawn {
@@ -134,7 +134,7 @@ object Test extends Properties("ConcurrentTrieMap") {
property("update") = forAll(sizes) {
(n: Int) =>
- val ct = new ConcurrentTrieMap[Int, Int]
+ val ct = new TrieMap[Int, Int]
for (i <- 0 until n) ct(i) = i
(0 until n) forall {
case i => ct(i) == i
@@ -143,7 +143,7 @@ object Test extends Properties("ConcurrentTrieMap") {
property("concurrent update") = forAll(threadCountsAndSizes) {
case (p, sz) =>
- val ct = new ConcurrentTrieMap[Wrap, Int]
+ val ct = new TrieMap[Wrap, Int]
inParallel(p) {
idx =>
@@ -158,7 +158,7 @@ object Test extends Properties("ConcurrentTrieMap") {
property("concurrent remove") = forAll(threadCounts, sizes) {
(p, sz) =>
- val ct = new ConcurrentTrieMap[Wrap, Int]
+ val ct = new TrieMap[Wrap, Int]
for (i <- 0 until sz) ct(Wrap(i)) = i
inParallel(p) {
@@ -174,7 +174,7 @@ object Test extends Properties("ConcurrentTrieMap") {
property("concurrent putIfAbsent") = forAll(threadCounts, sizes) {
(p, sz) =>
- val ct = new ConcurrentTrieMap[Wrap, Int]
+ val ct = new TrieMap[Wrap, Int]
val results = inParallel(p) {
idx =>
diff --git a/test/files/scalacheck/parallel-collections/ParallelCtrieCheck.scala b/test/files/scalacheck/parallel-collections/ParallelCtrieCheck.scala
index a04c0ff8d4..e141c398fd 100644
--- a/test/files/scalacheck/parallel-collections/ParallelCtrieCheck.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelCtrieCheck.scala
@@ -19,21 +19,21 @@ abstract class ParallelConcurrentTrieMapCheck[K, V](tp: String) extends Parallel
// ForkJoinTasks.defaultForkJoinPool.setMaximumPoolSize(Runtime.getRuntime.availableProcessors * 2)
// ForkJoinTasks.defaultForkJoinPool.setParallelism(Runtime.getRuntime.availableProcessors * 2)
- type CollType = ParConcurrentTrieMap[K, V]
+ type CollType = ParTrieMap[K, V]
def isCheckingViews = false
def hasStrictOrder = false
def ofSize(vals: Seq[Gen[(K, V)]], sz: Int) = {
- val ct = new mutable.ConcurrentTrieMap[K, V]
+ val ct = new concurrent.TrieMap[K, V]
val gen = vals(rnd.nextInt(vals.size))
for (i <- 0 until sz) ct += sample(gen)
ct
}
def fromTraversable(t: Traversable[(K, V)]) = {
- val pct = new ParConcurrentTrieMap[K, V]
+ val pct = new ParTrieMap[K, V]
var i = 0
for (kv <- t.toList) {
pct += kv
@@ -58,7 +58,7 @@ with PairValues[Int, Int]
def koperators = intoperators
override def printDataStructureDebugInfo(ds: AnyRef) = ds match {
- case pm: ParConcurrentTrieMap[k, v] =>
+ case pm: ParTrieMap[k, v] =>
println("Mutable parallel ctrie")
case _ =>
println("could not match data structure type: " + ds.getClass)