summaryrefslogtreecommitdiff
path: root/test/files/run/ctries/lnode.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/run/ctries/lnode.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/run/ctries/lnode.scala')
-rw-r--r--test/files/run/ctries/lnode.scala14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/files/run/ctries/lnode.scala b/test/files/run/ctries/lnode.scala
index e480795956..92a31088e5 100644
--- a/test/files/run/ctries/lnode.scala
+++ b/test/files/run/ctries/lnode.scala
@@ -1,7 +1,7 @@
-import collection.mutable.ConcurrentTrieMap
+import collection.concurrent.TrieMap
object LNodeSpec extends Spec {
@@ -11,19 +11,19 @@ object LNodeSpec extends Spec {
def test() {
"accept elements with the same hash codes" in {
- val ct = new ConcurrentTrieMap[DumbHash, Int]
+ val ct = new TrieMap[DumbHash, Int]
for (i <- 0 until initsz) ct.update(new DumbHash(i), i)
}
"lookup elements with the same hash codes" in {
- val ct = new ConcurrentTrieMap[DumbHash, Int]
+ val ct = new TrieMap[DumbHash, Int]
for (i <- 0 until initsz) ct.update(new DumbHash(i), i)
for (i <- 0 until initsz) assert(ct.get(new DumbHash(i)) == Some(i))
for (i <- initsz until secondsz) assert(ct.get(new DumbHash(i)) == None)
}
"remove elements with the same hash codes" in {
- val ct = new ConcurrentTrieMap[DumbHash, Int]
+ val ct = new TrieMap[DumbHash, Int]
for (i <- 0 until initsz) ct.update(new DumbHash(i), i)
for (i <- 0 until initsz) {
val remelem = ct.remove(new DumbHash(i))
@@ -33,7 +33,7 @@ object LNodeSpec extends Spec {
}
"put elements with the same hash codes if absent" in {
- val ct = new ConcurrentTrieMap[DumbHash, Int]
+ val ct = new TrieMap[DumbHash, Int]
for (i <- 0 until initsz) ct.put(new DumbHash(i), i)
for (i <- 0 until initsz) assert(ct.lookup(new DumbHash(i)) == i)
for (i <- 0 until initsz) assert(ct.putIfAbsent(new DumbHash(i), i) == Some(i))
@@ -42,7 +42,7 @@ object LNodeSpec extends Spec {
}
"replace elements with the same hash codes" in {
- val ct = new ConcurrentTrieMap[DumbHash, Int]
+ val ct = new TrieMap[DumbHash, Int]
for (i <- 0 until initsz) assert(ct.put(new DumbHash(i), i) == None)
for (i <- 0 until initsz) assert(ct.lookup(new DumbHash(i)) == i)
for (i <- 0 until initsz) assert(ct.replace(new DumbHash(i), -i) == Some(i))
@@ -51,7 +51,7 @@ object LNodeSpec extends Spec {
}
"remove elements with the same hash codes if mapped to a specific value" in {
- val ct = new ConcurrentTrieMap[DumbHash, Int]
+ val ct = new TrieMap[DumbHash, Int]
for (i <- 0 until initsz) assert(ct.put(new DumbHash(i), i) == None)
for (i <- 0 until initsz) assert(ct.remove(new DumbHash(i), i) == true)
}