summaryrefslogtreecommitdiff
path: root/test/pending
diff options
context:
space:
mode:
authorAleksandar Prokopec <axel22@gmail.com>2012-05-02 15:05:24 +0200
committerAleksandar Prokopec <axel22@gmail.com>2012-05-02 15:05:24 +0200
commitd0fd3b3a3423cf07ed90d699b41f3a4822773107 (patch)
treea314b107ca19c58175dfbcc093ebb72f0b68725e /test/pending
parent90d2bee45b25844f809f8c5300aefcb1bfe9e336 (diff)
downloadscala-d0fd3b3a3423cf07ed90d699b41f3a4822773107.tar.gz
scala-d0fd3b3a3423cf07ed90d699b41f3a4822773107.tar.bz2
scala-d0fd3b3a3423cf07ed90d699b41f3a4822773107.zip
Add pending test for SI-5018.
Diffstat (limited to 'test/pending')
-rw-r--r--test/pending/run/t5018.scala34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/pending/run/t5018.scala b/test/pending/run/t5018.scala
new file mode 100644
index 0000000000..30c0d5ac94
--- /dev/null
+++ b/test/pending/run/t5018.scala
@@ -0,0 +1,34 @@
+
+
+
+import java.io._
+import collection._
+
+
+
+object Test {
+
+ def serializeDeserialize[T <: AnyRef](obj: T) = {
+ val buffer = new ByteArrayOutputStream
+ val out = new ObjectOutputStream(buffer)
+ out.writeObject(obj)
+ val in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray))
+ in.readObject.asInstanceOf[T]
+ }
+
+ def main(args: Array[String]) {
+ val values = mutable.Map(1 -> 1).values
+ assert(serializeDeserialize(values) == values)
+
+ val keyset = mutable.Map(1 -> 1).keySet
+ assert(serializeDeserialize(keyset) == keyset)
+
+ val imkeyset = immutable.Map(1 -> 1).keySet
+ assert(serializeDeserialize(imkeyset) == imkeyset)
+
+ val defaultmap = immutable.Map(1 -> 1).withDefaultValue(1)
+ assert(serializeDeserialize(defaultmap) == defaultmap)
+ }
+
+}
+