diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t5590.check | 4 | ||||
-rw-r--r-- | test/files/run/t5590.scala | 31 |
2 files changed, 35 insertions, 0 deletions
diff --git a/test/files/run/t5590.check b/test/files/run/t5590.check new file mode 100644 index 0000000000..ad4a2eee64 --- /dev/null +++ b/test/files/run/t5590.check @@ -0,0 +1,4 @@ +Map(a -> a, b -> b, c -> c) +Map(a -> a, b -> b, c -> c) +Set(a, b, c, d, e) +Set(a, b, c, d, e)
\ No newline at end of file diff --git a/test/files/run/t5590.scala b/test/files/run/t5590.scala new file mode 100644 index 0000000000..9c806e0b7d --- /dev/null +++ b/test/files/run/t5590.scala @@ -0,0 +1,31 @@ + + + +import java.io._ +import collection._ + + + +object Test { + + def check(obj: AnyRef) { + 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]) { + val lhm = mutable.LinkedHashMap("a" -> "a", "b" -> "b", "c" -> "c") + val lhs = mutable.LinkedHashSet("a", "b", "c", "d", "e") + check(lhm) + check(lhs) + } + +} |