diff options
Diffstat (limited to 'tests/run/t5590.scala')
-rw-r--r-- | tests/run/t5590.scala | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/run/t5590.scala b/tests/run/t5590.scala new file mode 100644 index 000000000..aded59863 --- /dev/null +++ b/tests/run/t5590.scala @@ -0,0 +1,31 @@ + + + +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) + } + +} |