diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-02-12 22:23:56 -0800 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-02-12 22:23:56 -0800 |
commit | bafebe1c161f8db0be758c30fe5cc51082a56427 (patch) | |
tree | 8513c435bb53b3d2015fbbd7dd0f4c9bb28e6212 /test/files/run | |
parent | fa0a58d5f0d470fd6e387d1a9d83ee13bf796233 (diff) | |
parent | 76f167388a42e9bb8b72645d87bcb408b6981576 (diff) | |
download | scala-bafebe1c161f8db0be758c30fe5cc51082a56427.tar.gz scala-bafebe1c161f8db0be758c30fe5cc51082a56427.tar.bz2 scala-bafebe1c161f8db0be758c30fe5cc51082a56427.zip |
Merge pull request #2124 from adriaanm/76f167388a42e9bb8b72645d87bcb408b6981576
merge 2.10.x
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t6370.scala | 12 | ||||
-rw-r--r-- | test/files/run/t6935.scala | 14 |
2 files changed, 26 insertions, 0 deletions
diff --git a/test/files/run/t6370.scala b/test/files/run/t6370.scala new file mode 100644 index 0000000000..c86b87dc8a --- /dev/null +++ b/test/files/run/t6370.scala @@ -0,0 +1,12 @@ +object Test { + + def main(args: Array[String]): Unit = { + val m = collection.immutable.ListMap( "x" -> 1 ) + try { + m("y") + } catch { + case e : NoSuchElementException => assert(e.getMessage() == "key not found: y") + } + + } +} diff --git a/test/files/run/t6935.scala b/test/files/run/t6935.scala new file mode 100644 index 0000000000..dea2d7f2e2 --- /dev/null +++ b/test/files/run/t6935.scala @@ -0,0 +1,14 @@ +object Test { + + def main(args: Array[String]): Unit = { + import java.io._ + val bytes = new ByteArrayOutputStream() + val out = new ObjectOutputStream(bytes) + out.writeObject(()) + out.close() + val buf = bytes.toByteArray + val in = new ObjectInputStream(new ByteArrayInputStream(buf)) + val unit = in.readObject() + assert(unit == ()) + } +} |