Permalink
Browse files

Add pending test for SI-5018.

  • Loading branch information...
axel22 committed May 2, 2012
1 parent 90d2bee commit d0fd3b3a3423cf07ed90d699b41f3a4822773107
Showing with 34 additions and 0 deletions.
  1. +34 −0 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)
}
}

0 comments on commit d0fd3b3

Please sign in to comment.