summaryrefslogtreecommitdiff
path: root/test/files/scalacheck
diff options
context:
space:
mode:
authorAleksandar Prokopec <axel22@gmail.com>2012-03-16 16:11:41 +0100
committerAleksandar Prokopec <axel22@gmail.com>2012-03-16 16:11:41 +0100
commitf5215cd20ca5bc4566538c87e7095ec65b63aaae (patch)
tree8391cbb9199b555f028ebcb2236d8b2e7c634fe7 /test/files/scalacheck
parentf987afe55e6d4f71c7e9ad10d1ca9f6120dc1132 (diff)
downloadscala-f5215cd20ca5bc4566538c87e7095ec65b63aaae.tar.gz
scala-f5215cd20ca5bc4566538c87e7095ec65b63aaae.tar.bz2
scala-f5215cd20ca5bc4566538c87e7095ec65b63aaae.zip
Renaming Ctrie to ConcurrentTrieMap.
Diffstat (limited to 'test/files/scalacheck')
-rw-r--r--test/files/scalacheck/Ctrie.scala14
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelCtrieCheck.scala12
-rw-r--r--test/files/scalacheck/parallel-collections/pc.scala2
3 files changed, 14 insertions, 14 deletions
diff --git a/test/files/scalacheck/Ctrie.scala b/test/files/scalacheck/Ctrie.scala
index 2950937278..b9d71b88a3 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.Ctrie
+import collection.mutable.ConcurrentTrieMap
@@ -16,7 +16,7 @@ case class Wrap(i: Int) {
/** A check mainly oriented towards checking snapshot correctness.
*/
-object Test extends Properties("Ctrie") {
+object Test extends Properties("ConcurrentTrieMap") {
/* generators */
@@ -102,7 +102,7 @@ object Test extends Properties("Ctrie") {
(numThreads, numElems) =>
val p = 3 //numThreads
val sz = 102 //numElems
- val ct = new Ctrie[Wrap, Int]
+ val ct = new ConcurrentTrieMap[Wrap, Int]
// checker
val checker = spawn {
@@ -134,7 +134,7 @@ object Test extends Properties("Ctrie") {
property("update") = forAll(sizes) {
(n: Int) =>
- val ct = new Ctrie[Int, Int]
+ val ct = new ConcurrentTrieMap[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("Ctrie") {
property("concurrent update") = forAll(threadCountsAndSizes) {
case (p, sz) =>
- val ct = new Ctrie[Wrap, Int]
+ val ct = new ConcurrentTrieMap[Wrap, Int]
inParallel(p) {
idx =>
@@ -158,7 +158,7 @@ object Test extends Properties("Ctrie") {
property("concurrent remove") = forAll(threadCounts, sizes) {
(p, sz) =>
- val ct = new Ctrie[Wrap, Int]
+ val ct = new ConcurrentTrieMap[Wrap, Int]
for (i <- 0 until sz) ct(Wrap(i)) = i
inParallel(p) {
@@ -174,7 +174,7 @@ object Test extends Properties("Ctrie") {
property("concurrent putIfAbsent") = forAll(threadCounts, sizes) {
(p, sz) =>
- val ct = new Ctrie[Wrap, Int]
+ val ct = new ConcurrentTrieMap[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 d1924f0ada..a04c0ff8d4 100644
--- a/test/files/scalacheck/parallel-collections/ParallelCtrieCheck.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelCtrieCheck.scala
@@ -15,25 +15,25 @@ import scala.collection.parallel.ops._
-abstract class ParallelCtrieCheck[K, V](tp: String) extends ParallelMapCheck[K, V]("mutable.ParCtrie[" + tp + "]") {
+abstract class ParallelConcurrentTrieMapCheck[K, V](tp: String) extends ParallelMapCheck[K, V]("mutable.ParConcurrentTrieMap[" + tp + "]") {
// ForkJoinTasks.defaultForkJoinPool.setMaximumPoolSize(Runtime.getRuntime.availableProcessors * 2)
// ForkJoinTasks.defaultForkJoinPool.setParallelism(Runtime.getRuntime.availableProcessors * 2)
- type CollType = ParCtrie[K, V]
+ type CollType = ParConcurrentTrieMap[K, V]
def isCheckingViews = false
def hasStrictOrder = false
def ofSize(vals: Seq[Gen[(K, V)]], sz: Int) = {
- val ct = new mutable.Ctrie[K, V]
+ val ct = new mutable.ConcurrentTrieMap[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 ParCtrie[K, V]
+ val pct = new ParConcurrentTrieMap[K, V]
var i = 0
for (kv <- t.toList) {
pct += kv
@@ -45,7 +45,7 @@ abstract class ParallelCtrieCheck[K, V](tp: String) extends ParallelMapCheck[K,
}
-object IntIntParallelCtrieCheck extends ParallelCtrieCheck[Int, Int]("Int, Int")
+object IntIntParallelConcurrentTrieMapCheck extends ParallelConcurrentTrieMapCheck[Int, Int]("Int, Int")
with PairOperators[Int, Int]
with PairValues[Int, Int]
{
@@ -58,7 +58,7 @@ with PairValues[Int, Int]
def koperators = intoperators
override def printDataStructureDebugInfo(ds: AnyRef) = ds match {
- case pm: ParCtrie[k, v] =>
+ case pm: ParConcurrentTrieMap[k, v] =>
println("Mutable parallel ctrie")
case _ =>
println("could not match data structure type: " + ds.getClass)
diff --git a/test/files/scalacheck/parallel-collections/pc.scala b/test/files/scalacheck/parallel-collections/pc.scala
index 8a0dba3c25..0a91977da0 100644
--- a/test/files/scalacheck/parallel-collections/pc.scala
+++ b/test/files/scalacheck/parallel-collections/pc.scala
@@ -26,7 +26,7 @@ class ParCollProperties extends Properties("Parallel collections") {
include(mutable.IntIntParallelHashMapCheck)
// parallel ctrie
- include(mutable.IntIntParallelCtrieCheck)
+ include(mutable.IntIntParallelConcurrentTrieMapCheck)
// parallel mutable hash sets (tables)
include(mutable.IntParallelHashSetCheck)