diff options
author | Paul Phillips <paulp@improving.org> | 2011-08-24 17:11:55 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-08-24 17:11:55 +0000 |
commit | b9785280a7138a2bb52060faf94807aa0d07dec1 (patch) | |
tree | 870cc1930ac3d50cd07078260f58984224dd39a5 /test/files/run/bug978.scala | |
parent | 84fcf633d9ca507124806d64729cb8463bcebb69 (diff) | |
download | scala-b9785280a7138a2bb52060faf94807aa0d07dec1.tar.gz scala-b9785280a7138a2bb52060faf94807aa0d07dec1.tar.bz2 scala-b9785280a7138a2bb52060faf94807aa0d07dec1.zip |
Renamed tests named bugXXX to tXXX, no review.
Diffstat (limited to 'test/files/run/bug978.scala')
-rw-r--r-- | test/files/run/bug978.scala | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/test/files/run/bug978.scala b/test/files/run/bug978.scala deleted file mode 100644 index 3ffac92761..0000000000 --- a/test/files/run/bug978.scala +++ /dev/null @@ -1,38 +0,0 @@ -class Foo(val n: Int) { - override def hashCode = n % 2 // pretty bad hash - override def equals(other: Any): Boolean = other match { - case f: Foo => f.n == n - case _ => false - } - - override def toString = "" + n -} - -object Test extends App { - val set = new collection.mutable.HashSet[Foo] -// val set = new collection.jcl.HashSet[Foo] - - val max = 200 - for (x <- 1 to max) - set += new Foo(x) - - testRemove(2) - testExists(2) - - def testRemove(m: Int) { - for (x <- 1 to max; if x % m == 0) { - val f = new Foo(x) - set -= f - assert(!(set contains f)) - testExists(m) - } - } - - def testExists(m: Int) { - for (x <- 1 to max; if x % m == 1) { - val f = new Foo(x) - assert(set contains f, "For element: " + f + " set: " + set) - } - } - -} |