diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-11-19 15:03:47 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-11-19 15:03:47 +0000 |
commit | 4886b55fa41e6c98434c90fe33a5909c5c935b5b (patch) | |
tree | d2b89798b09ff6141719ab2551660867042d436a /test | |
parent | 72969dec9de6b569f932577283b2029c682cf1d1 (diff) | |
download | scala-4886b55fa41e6c98434c90fe33a5909c5c935b5b.tar.gz scala-4886b55fa41e6c98434c90fe33a5909c5c935b5b.tar.bz2 scala-4886b55fa41e6c98434c90fe33a5909c5c935b5b.zip |
Fixes #3647, closes #3647, adds a test case for...
Fixes #3647, closes #3647, adds a test case for it, and a missing test
case for #3935.
No review.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t3647.scala | 23 | ||||
-rw-r--r-- | test/files/run/t3935.scala | 15 |
2 files changed, 38 insertions, 0 deletions
diff --git a/test/files/run/t3647.scala b/test/files/run/t3647.scala new file mode 100644 index 0000000000..a970e887f6 --- /dev/null +++ b/test/files/run/t3647.scala @@ -0,0 +1,23 @@ + + + +import collection.immutable._ + + +object Test { + def main(args: Array[String]) { + val ps = PagedSeq.fromLines(List( + "line1", + "line2", + "line3", + "line4" + ).iterator) + assert(ps.filter(_ == '\n').size == 3) + + val ps1 = PagedSeq.fromLines(List("Ok").iterator) + assert(ps1.filter(_ == '\n').size == 0) + + val eps = PagedSeq.fromLines(List().iterator) + assert(eps.filter(_ == '\n').size == 0) + } +} diff --git a/test/files/run/t3935.scala b/test/files/run/t3935.scala new file mode 100644 index 0000000000..c66b1b0599 --- /dev/null +++ b/test/files/run/t3935.scala @@ -0,0 +1,15 @@ + + + + +object Test { + def main(args: Array[String]) { + val q = scala.collection.mutable.Queue[String]() + assert(q.length == 0) + try { + assert(q.front != null) + } catch { + case _ => + } + } +} |