summaryrefslogtreecommitdiff
path: root/test/files/scalacheck/Ctrie.scala
diff options
context:
space:
mode:
authorAleksandar Prokopec <axel22@gmail.com>2012-03-27 20:57:45 +0200
committerAleksandar Prokopec <axel22@gmail.com>2012-03-27 21:00:28 +0200
commit37b6b48b5fabb804ec02d762df7d83577ccad2ac (patch)
treea4267edcf349b6bdb7a1628a7b3d5225798303bc /test/files/scalacheck/Ctrie.scala
parent0321df7292018d1e7408ef9ad193c8fc7bf4765d (diff)
downloadscala-37b6b48b5fabb804ec02d762df7d83577ccad2ac.tar.gz
scala-37b6b48b5fabb804ec02d762df7d83577ccad2ac.tar.bz2
scala-37b6b48b5fabb804ec02d762df7d83577ccad2ac.zip
Rename ConcurrentTrieMap to concurrent.TrieMap.
Introduced the collection.concurrent package and introduced the concurrent.Map trait there. Deprecated the mutable.ConcurrentMap trait. Pending work - introduce the appropriate changes to JavaConversions and JavaConverters.
Diffstat (limited to 'test/files/scalacheck/Ctrie.scala')
-rw-r--r--test/files/scalacheck/Ctrie.scala14
1 files changed, 7 insertions, 7 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 =>