summaryrefslogtreecommitdiff
path: root/test/files/jvm
diff options
context:
space:
mode:
authoraleksandar <aleksandar@lampmac14.epfl.ch>2012-01-12 15:28:25 +0100
committeraleksandar <aleksandar@lampmac14.epfl.ch>2012-01-12 15:30:42 +0100
commit51ddeb372b3f0b22041d9a51f3faee17acd7b749 (patch)
tree5f1156ed34f7cc429189e18cc88782f13a3bfc86 /test/files/jvm
parent178d49df450904330c06cfea9955f120ba04d34c (diff)
downloadscala-51ddeb372b3f0b22041d9a51f3faee17acd7b749.tar.gz
scala-51ddeb372b3f0b22041d9a51f3faee17acd7b749.tar.bz2
scala-51ddeb372b3f0b22041d9a51f3faee17acd7b749.zip
Add mutable tree sets to the standard library.
This implementation is based on AVL trees. The current implementation is contributed by Lucien Pereira. Fixes #4147.
Diffstat (limited to 'test/files/jvm')
-rw-r--r--test/files/jvm/serialization.check4
-rw-r--r--test/files/jvm/serialization.scala7
2 files changed, 10 insertions, 1 deletions
diff --git a/test/files/jvm/serialization.check b/test/files/jvm/serialization.check
index 15708f0c3b..bc56387f81 100644
--- a/test/files/jvm/serialization.check
+++ b/test/files/jvm/serialization.check
@@ -188,6 +188,10 @@ x = WrappedArray(1, 2, 3)
y = WrappedArray(1, 2, 3)
x equals y: true, y equals x: true
+x = TreeSet(1, 2, 3)
+y = TreeSet(1, 2, 3)
+x equals y: true, y equals x: true
+
x = xml:src="hello"
y = xml:src="hello"
x equals y: true, y equals x: true
diff --git a/test/files/jvm/serialization.scala b/test/files/jvm/serialization.scala
index 9391b60e46..73bed2d46b 100644
--- a/test/files/jvm/serialization.scala
+++ b/test/files/jvm/serialization.scala
@@ -286,7 +286,7 @@ object Test3_mutable {
import scala.collection.mutable.{
ArrayBuffer, ArrayBuilder, ArraySeq, ArrayStack, BitSet, DoubleLinkedList,
HashMap, HashSet, History, LinkedList, ListBuffer, Publisher, Queue,
- Stack, StringBuilder, WrappedArray}
+ Stack, StringBuilder, WrappedArray, TreeSet}
// in alphabetic order
try {
@@ -380,6 +380,11 @@ object Test3_mutable {
val wa1 = WrappedArray.make(Array(1, 2, 3))
val _wa1: WrappedArray[Int] = read(write(wa1))
check(wa1, _wa1)
+
+ // TreeSet
+ val ts1 = TreeSet[Int]() ++= Array(1, 2, 3)
+ val _ts1: TreeSet[Int] = read(write(ts1))
+ check(ts1, _ts1)
}
catch {
case e: Exception =>