summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorMirco Dotta <mirco.dotta@typesafe.com>2012-06-25 16:57:04 +0200
committerLukas Rytz <lukas.rytz@epfl.ch>2012-07-05 12:12:40 +0200
commit4b6ae392a7aaf147de3991998d52be5e7b7e665e (patch)
treef65bef9d84f473e1980d8833644c267c4317a0e0 /test/files
parent33936243bdf597e438de8d10ae7b3ed30454be9f (diff)
downloadscala-4b6ae392a7aaf147de3991998d52be5e7b7e665e.tar.gz
scala-4b6ae392a7aaf147de3991998d52be5e7b7e665e.tar.bz2
scala-4b6ae392a7aaf147de3991998d52be5e7b7e665e.zip
Enhanced presentation compiler test infrastructure
* Removed unneeded .flags. * Renamed a few methods in `InteractiveTest`. * Force the presentation compiler to shut down after each test. * -sourcepath in the .flags file is now relative to the test's base directory. * Use `InteractiveReporter` in Presentation Compiler tests. By using the `InteractiveReporter`, compilation errors are collected in the compilation unit. This was necessary for testing SI-5975.
Diffstat (limited to 'test/files')
-rw-r--r--test/files/presentation/hyperlinks.flags2
-rw-r--r--test/files/presentation/hyperlinks/Runner.scala4
-rw-r--r--test/files/presentation/ide-bug-1000469/Runner.scala4
-rw-r--r--test/files/presentation/ide-bug-1000531.flags18
-rw-r--r--test/files/presentation/memory-leaks/MemoryLeaksTest.scala5
-rw-r--r--test/files/presentation/t5708/Test.scala4
-rw-r--r--test/files/presentation/visibility/Test.scala4
7 files changed, 6 insertions, 35 deletions
diff --git a/test/files/presentation/hyperlinks.flags b/test/files/presentation/hyperlinks.flags
deleted file mode 100644
index dc13682c5e..0000000000
--- a/test/files/presentation/hyperlinks.flags
+++ /dev/null
@@ -1,2 +0,0 @@
-# This test will fail in the new pattern matcher because
-# it generates trees whose positions are not transparent
diff --git a/test/files/presentation/hyperlinks/Runner.scala b/test/files/presentation/hyperlinks/Runner.scala
index 3d19f2d948..61da49a3d7 100644
--- a/test/files/presentation/hyperlinks/Runner.scala
+++ b/test/files/presentation/hyperlinks/Runner.scala
@@ -1,11 +1,11 @@
import scala.tools.nsc.interactive.tests.InteractiveTest
object Test extends InteractiveTest {
- override def runTests() {
+ override def runDefaultTests() {
// make sure typer is done.. the virtual pattern matcher might translate
// some trees and mess up positions. But we'll catch it red handed!
sourceFiles foreach (src => askLoadedTyped(src).get)
- super.runTests()
+ super.runDefaultTests()
}
} \ No newline at end of file
diff --git a/test/files/presentation/ide-bug-1000469/Runner.scala b/test/files/presentation/ide-bug-1000469/Runner.scala
index c53533fddd..1ef3cf9025 100644
--- a/test/files/presentation/ide-bug-1000469/Runner.scala
+++ b/test/files/presentation/ide-bug-1000469/Runner.scala
@@ -1,5 +1,3 @@
import scala.tools.nsc.interactive.tests._
-object Test extends InteractiveTest {
- override val runRandomTests = false
-}
+object Test extends InteractiveTest \ No newline at end of file
diff --git a/test/files/presentation/ide-bug-1000531.flags b/test/files/presentation/ide-bug-1000531.flags
deleted file mode 100644
index 56d026a62d..0000000000
--- a/test/files/presentation/ide-bug-1000531.flags
+++ /dev/null
@@ -1,18 +0,0 @@
-# This file contains command line options that are passed to the presentation compiler
-# Lines starting with # are stripped, and you can split arguments on several lines.
-
-# The -bootclasspath option is treated specially by the test framework: if it's not specified
-# in this file, the presentation compiler will pick up the scala-library/compiler that's on the
-# java classpath used to run this test (usually build/pack)
-
-# Any option can be passed this way, like presentation debug
-# -Ypresentation-debug -Ypresentation-verbose
-
-# the classpath is relative to the current working directory. That means it depends where you're
-# running partest from. Run it from the root scala checkout for these files to resolve correctly
-# (by default when running 'ant test', or 'test/partest'). Paths use Unix separators, the test
-# framework translates them to the platform dependent representation.
-# -bootclasspath lib/scala-compiler.jar:lib/scala-library.jar:lib/fjbg.jar
-
-# the following line would test using the quick compiler
-# -bootclasspath build/quick/classes/compiler:build/quick/classes/library:lib/fjbg.jar
diff --git a/test/files/presentation/memory-leaks/MemoryLeaksTest.scala b/test/files/presentation/memory-leaks/MemoryLeaksTest.scala
index 857beac7df..a5533a623a 100644
--- a/test/files/presentation/memory-leaks/MemoryLeaksTest.scala
+++ b/test/files/presentation/memory-leaks/MemoryLeaksTest.scala
@@ -24,10 +24,7 @@ import scala.tools.nsc.io._
object Test extends InteractiveTest {
final val mega = 1024 * 1024
- override def main(args: Array[String]) {
- memoryConsumptionTest()
- compiler.askShutdown()
- }
+ override def execute(): Unit = memoryConsumptionTest()
def batchSource(name: String) =
new BatchSourceFile(AbstractFile.getFile(name))
diff --git a/test/files/presentation/t5708/Test.scala b/test/files/presentation/t5708/Test.scala
index 96e758d974..bec1131c4c 100644
--- a/test/files/presentation/t5708/Test.scala
+++ b/test/files/presentation/t5708/Test.scala
@@ -1,5 +1,3 @@
import scala.tools.nsc.interactive.tests.InteractiveTest
-object Test extends InteractiveTest {
-
-} \ No newline at end of file
+object Test extends InteractiveTest \ No newline at end of file
diff --git a/test/files/presentation/visibility/Test.scala b/test/files/presentation/visibility/Test.scala
index 96e758d974..bec1131c4c 100644
--- a/test/files/presentation/visibility/Test.scala
+++ b/test/files/presentation/visibility/Test.scala
@@ -1,5 +1,3 @@
import scala.tools.nsc.interactive.tests.InteractiveTest
-object Test extends InteractiveTest {
-
-} \ No newline at end of file
+object Test extends InteractiveTest \ No newline at end of file