From 9266922e1bfcbbebc9b5926864f7e70e49e142e7 Mon Sep 17 00:00:00 2001 From: Aleksandar Pokopec Date: Wed, 17 Nov 2010 17:04:09 +0000 Subject: Fixes #3989, adding test cases for #3989 and #3... Fixes #3989, adding test cases for #3989 and #3996. No review. --- test/files/run/t3989.scala | 16 ++++++++++++++++ test/files/run/t3996.scala | 12 ++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 test/files/run/t3989.scala create mode 100644 test/files/run/t3996.scala (limited to 'test') 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) + } +} -- cgit v1.2.3