diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-11-17 17:04:09 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-11-17 17:04:09 +0000 |
commit | 9266922e1bfcbbebc9b5926864f7e70e49e142e7 (patch) | |
tree | 594831f5ab6738da2a17190f52641fb9e0eb45d9 /test/files/run | |
parent | 048abea8290d2bbb689196e68ada76d5ad368ba9 (diff) | |
download | scala-9266922e1bfcbbebc9b5926864f7e70e49e142e7.tar.gz scala-9266922e1bfcbbebc9b5926864f7e70e49e142e7.tar.bz2 scala-9266922e1bfcbbebc9b5926864f7e70e49e142e7.zip |
Fixes #3989, adding test cases for #3989 and #3...
Fixes #3989, adding test cases for #3989 and #3996.
No review.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t3989.scala | 16 | ||||
-rw-r--r-- | test/files/run/t3996.scala | 12 |
2 files changed, 28 insertions, 0 deletions
diff --git a/test/files/run/t3989.scala b/test/files/run/t3989.scala new file mode 100644 index 0000000000..d519978e54 --- /dev/null +++ b/test/files/run/t3989.scala @@ -0,0 +1,16 @@ + + + + + +class Foo{ override def equals(o: Any) = false; override def hashCode = 1} + +object Test { + def main(args: Array[String]) { + import collection.immutable.HashMap + var m = Map[Foo, Int]() + for (i <- 1 to 30000) m += (new Foo) -> i + assert(m.size == 30000) + m.toString + } +} diff --git a/test/files/run/t3996.scala b/test/files/run/t3996.scala new file mode 100644 index 0000000000..1bb1216390 --- /dev/null +++ b/test/files/run/t3996.scala @@ -0,0 +1,12 @@ + + + + + +object Test { + def main(args: Array[String]) { + import collection.mutable.LinkedList + val l = new LinkedList[Int]() ++ (0 until 10000) + assert(l.length == 10000) + } +} |