summaryrefslogtreecommitdiff
path: root/test/files/run/t5293.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-07-17 10:02:55 +0200
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-07-17 17:26:27 +0200
commit1729b26500506530733753d44f9ce2a2597e0e33 (patch)
treefb21521e8f5d9e4dbf1cc9bcdadc4485492586e3 /test/files/run/t5293.scala
parent022eed3245db21f5faf06ae6472e585ead137f82 (diff)
downloadscala-1729b26500506530733753d44f9ce2a2597e0e33.tar.gz
scala-1729b26500506530733753d44f9ce2a2597e0e33.tar.bz2
scala-1729b26500506530733753d44f9ce2a2597e0e33.zip
move test files that fail spuriously to pending
I have this sneaky suspicion that part of these spurious failures are caused by the recent partest optimizations. @axel22 already checked that compiler instances are not shared between test runs. However, except for the benchmark test, they all have a distinct race condition in symbol loading/type checking feel to them. Since, in the end, the tests and/or their corresponding fixes are as likely a culprit as the test framework, moving them out of the way until their owners can get them back in line and they stop throwing primate wenches into our build. We should bring them back as soon as possible, though.
Diffstat (limited to 'test/files/run/t5293.scala')
-rw-r--r--test/files/run/t5293.scala83
1 files changed, 0 insertions, 83 deletions
diff --git a/test/files/run/t5293.scala b/test/files/run/t5293.scala
deleted file mode 100644
index 01ead45d2a..0000000000
--- a/test/files/run/t5293.scala
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-import scala.collection.JavaConverters._
-
-
-
-object Test extends App {
-
- def bench(label: String)(body: => Unit): Long = {
- val start = System.nanoTime
-
- 0.until(10).foreach(_ => body)
-
- val end = System.nanoTime
-
- //println("%s: %s ms".format(label, (end - start) / 1000.0 / 1000.0))
-
- end - start
- }
-
- def benchJava(values: java.util.Collection[Int]) = {
- bench("Java Set") {
- val set = new java.util.HashSet[Int]
-
- set.addAll(values)
- }
- }
-
- def benchScala(values: Iterable[Int]) = {
- bench("Scala Set") {
- val set = new scala.collection.mutable.HashSet[Int]
-
- set ++= values
- }
- }
-
- def benchScalaSorted(values: Iterable[Int]) = {
- bench("Scala Set sorted") {
- val set = new scala.collection.mutable.HashSet[Int]
-
- set ++= values.toArray.sorted
- }
- }
-
- def benchScalaPar(values: Iterable[Int]) = {
- bench("Scala ParSet") {
- val set = new scala.collection.parallel.mutable.ParHashSet[Int] map { x => x }
-
- set ++= values
- }
- }
-
- val values = 0 until 50000
- val set = scala.collection.mutable.HashSet.empty[Int]
-
- set ++= values
-
- // warmup
- for (x <- 0 until 5) {
- benchJava(set.asJava)
- benchScala(set)
- benchScalaPar(set)
- benchJava(set.asJava)
- benchScala(set)
- benchScalaPar(set)
- }
-
- val javaset = benchJava(set.asJava)
- val scalaset = benchScala(set)
- val scalaparset = benchScalaPar(set)
-
- assert(scalaset < (javaset * 8), "scalaset: " + scalaset + " vs. javaset: " + javaset)
- assert(scalaparset < (javaset * 8), "scalaparset: " + scalaparset + " vs. javaset: " + javaset)
-}
-
-
-
-
-
-
-
-