aboutsummaryrefslogblamecommitdiff
path: root/tests/run/t5590.scala
blob: aded59863e0e6c3fad64756089a57a53d516ef60 (plain) (tree)






























                                                                       
import java.io._
import collection._



object Test {

  def check(obj: AnyRef): Unit = {
    println(obj)

    val bos = new ByteArrayOutputStream()
    val out = new ObjectOutputStream(bos)
    out.writeObject(obj)
    val arr = bos.toByteArray()
    val in = new ObjectInputStream(new ByteArrayInputStream(arr))
    val deser = in.readObject()

    println(deser)
  }

  def main(args: Array[String]): Unit = {
    val lhm = mutable.LinkedHashMap("a" -> "a", "b" -> "b", "c" -> "c")
    val lhs = mutable.LinkedHashSet("a", "b", "c", "d", "e")
    check(lhm)
    check(lhs)
  }

}