summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornielsen <nielsen@epfl.ch>2009-02-05 14:10:06 +0000
committernielsen <nielsen@epfl.ch>2009-02-05 14:10:06 +0000
commita81199163d973c9e643d28cc00bb3adb7ea26a10 (patch)
treecfa17090b8a0bc3ddc9bca70ee08cf30f8651ed4 /test
parentf86527ce55f17e794e5705dfd4b0cb90bdce2672 (diff)
downloadscala-a81199163d973c9e643d28cc00bb3adb7ea26a10.tar.gz
scala-a81199163d973c9e643d28cc00bb3adb7ea26a10.tar.bz2
scala-a81199163d973c9e643d28cc00bb3adb7ea26a10.zip
Missed some files.... but how ?
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/plugin-after-terminal.check2
-rw-r--r--test/files/neg/plugin-after-terminal.flags2
-rw-r--r--test/files/neg/plugin-after-terminal/lib/plugins.jar.desired.sha11
-rwxr-xr-xtest/files/neg/plugin-after-terminal/misc/build.sh14
-rw-r--r--test/files/neg/plugin-after-terminal/misc/scalac-plugin.xml6
-rw-r--r--test/files/neg/plugin-after-terminal/src/ThePlugin.scala31
-rw-r--r--test/files/neg/plugin-after-terminal/testsource.scala4
-rw-r--r--test/files/neg/plugin-before-parser.check2
-rw-r--r--test/files/neg/plugin-before-parser.flags2
-rw-r--r--test/files/neg/plugin-cyclic-dependency.check2
-rw-r--r--test/files/neg/plugin-cyclic-dependency.flags2
-rw-r--r--test/files/neg/plugin-multiple-rafter.check4
-rw-r--r--test/files/neg/plugin-multiple-rafter.flags2
-rw-r--r--test/files/neg/plugin-rafter-before-1.check2
-rw-r--r--test/files/neg/plugin-rafter-before-1.flags2
-rw-r--r--test/files/neg/plugin-rightafter-terminal.check2
-rw-r--r--test/files/neg/plugin-rightafter-terminal.flags2
17 files changed, 82 insertions, 0 deletions
diff --git a/test/files/neg/plugin-after-terminal.check b/test/files/neg/plugin-after-terminal.check
new file mode 100644
index 0000000000..b846dc0ab5
--- /dev/null
+++ b/test/files/neg/plugin-after-terminal.check
@@ -0,0 +1,2 @@
+error: [phase assembly, after dependency on terminal phase not allowed: afterterminal => terminal]
+one error found \ No newline at end of file
diff --git a/test/files/neg/plugin-after-terminal.flags b/test/files/neg/plugin-after-terminal.flags
new file mode 100644
index 0000000000..6a44376213
--- /dev/null
+++ b/test/files/neg/plugin-after-terminal.flags
@@ -0,0 +1,2 @@
+-Xplugin:files/neg/plugin-after-terminal/lib/plugins.jar
+
diff --git a/test/files/neg/plugin-after-terminal/lib/plugins.jar.desired.sha1 b/test/files/neg/plugin-after-terminal/lib/plugins.jar.desired.sha1
new file mode 100644
index 0000000000..835b5b8a05
--- /dev/null
+++ b/test/files/neg/plugin-after-terminal/lib/plugins.jar.desired.sha1
@@ -0,0 +1 @@
+b27d9a4cc768179da1d43f77dff631f900f050d0 ?plugins.jar
diff --git a/test/files/neg/plugin-after-terminal/misc/build.sh b/test/files/neg/plugin-after-terminal/misc/build.sh
new file mode 100755
index 0000000000..8899009d7f
--- /dev/null
+++ b/test/files/neg/plugin-after-terminal/misc/build.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+SCALAC="../../../../build/pack/bin/scalac -deprecation -cp ../../../../build/quick/classes/compiler/"
+
+BASE=`pwd`
+
+if [[ -d "${BASE}/src" ]] ; then
+
+ mkdir -p build
+ ${SCALAC} -d build src/*.scala
+ jar cf lib/plugins.jar -C misc/ scalac-plugin.xml -C build .
+ rm -rf build
+fi
+
diff --git a/test/files/neg/plugin-after-terminal/misc/scalac-plugin.xml b/test/files/neg/plugin-after-terminal/misc/scalac-plugin.xml
new file mode 100644
index 0000000000..58fff40950
--- /dev/null
+++ b/test/files/neg/plugin-after-terminal/misc/scalac-plugin.xml
@@ -0,0 +1,6 @@
+<!-- $Id$ -->
+<plugin>
+ <name>beforeparser</name>
+ <classname>scala.test.plugins.ThePlugin</classname>
+</plugin>
+
diff --git a/test/files/neg/plugin-after-terminal/src/ThePlugin.scala b/test/files/neg/plugin-after-terminal/src/ThePlugin.scala
new file mode 100644
index 0000000000..f3c913086e
--- /dev/null
+++ b/test/files/neg/plugin-after-terminal/src/ThePlugin.scala
@@ -0,0 +1,31 @@
+package scala.test.plugins
+
+import scala.tools.nsc
+import nsc.Global
+import nsc.Phase
+import nsc.plugins.Plugin
+import nsc.plugins.PluginComponent
+
+class ThePlugin(val global: Global) extends Plugin {
+ import global._
+
+ val name = "afterterminal"
+ val description = "Declares one plugin that wants to be after the terminal phase"
+ val components = List[PluginComponent](thePhase)
+
+ private object thePhase extends PluginComponent {
+ val global = ThePlugin.this.global
+
+ val runsAfter = List[String]("terminal")
+
+ val phaseName = ThePlugin.this.name
+
+ def newPhase(prev: Phase) = new ThePhase(prev)
+ }
+
+ private class ThePhase(prev: Phase) extends Phase(prev) {
+ def name = ThePlugin.this.name
+ def run {}
+ }
+}
+
diff --git a/test/files/neg/plugin-after-terminal/testsource.scala b/test/files/neg/plugin-after-terminal/testsource.scala
new file mode 100644
index 0000000000..519d162fdf
--- /dev/null
+++ b/test/files/neg/plugin-after-terminal/testsource.scala
@@ -0,0 +1,4 @@
+object Test extends Application {
+ println("afterterminal")
+}
+
diff --git a/test/files/neg/plugin-before-parser.check b/test/files/neg/plugin-before-parser.check
new file mode 100644
index 0000000000..253659eedb
--- /dev/null
+++ b/test/files/neg/plugin-before-parser.check
@@ -0,0 +1,2 @@
+error: [phase assembly, before dependency on parser phase not allowed: parser => beforeparser]
+one error found \ No newline at end of file
diff --git a/test/files/neg/plugin-before-parser.flags b/test/files/neg/plugin-before-parser.flags
new file mode 100644
index 0000000000..632530922c
--- /dev/null
+++ b/test/files/neg/plugin-before-parser.flags
@@ -0,0 +1,2 @@
+-Xplugin:files/neg/plugin-before-parser/lib/plugins.jar
+
diff --git a/test/files/neg/plugin-cyclic-dependency.check b/test/files/neg/plugin-cyclic-dependency.check
new file mode 100644
index 0000000000..7c1aeebfa0
--- /dev/null
+++ b/test/files/neg/plugin-cyclic-dependency.check
@@ -0,0 +1,2 @@
+error: fatal error: Cycle in compiler phase dependencies detected, phase cyclicdependency1 reacted twice!
+one error found \ No newline at end of file
diff --git a/test/files/neg/plugin-cyclic-dependency.flags b/test/files/neg/plugin-cyclic-dependency.flags
new file mode 100644
index 0000000000..8716aaa65f
--- /dev/null
+++ b/test/files/neg/plugin-cyclic-dependency.flags
@@ -0,0 +1,2 @@
+-Xplugin:files/neg/plugin-cyclic-dependency/lib/plugins.jar
+
diff --git a/test/files/neg/plugin-multiple-rafter.check b/test/files/neg/plugin-multiple-rafter.check
new file mode 100644
index 0000000000..5ba932413f
--- /dev/null
+++ b/test/files/neg/plugin-multiple-rafter.check
@@ -0,0 +1,4 @@
+error: fatal error: Multiple phases want to run right after the phase explicitouter
+Phases: erasure, multi-rafter,
+Re-run with -Xgenerate-phase-graph <filename> to better see the problem.
+one error found \ No newline at end of file
diff --git a/test/files/neg/plugin-multiple-rafter.flags b/test/files/neg/plugin-multiple-rafter.flags
new file mode 100644
index 0000000000..dcae7f2f96
--- /dev/null
+++ b/test/files/neg/plugin-multiple-rafter.flags
@@ -0,0 +1,2 @@
+-Xplugin:files/neg/plugin-multiple-rafter/lib/plugins.jar
+
diff --git a/test/files/neg/plugin-rafter-before-1.check b/test/files/neg/plugin-rafter-before-1.check
new file mode 100644
index 0000000000..7afe3be031
--- /dev/null
+++ b/test/files/neg/plugin-rafter-before-1.check
@@ -0,0 +1,2 @@
+error: fatal error: phase erasure want to run right after explicitouter, but some phase has declared to run before erasure. Re-run with -Xgenerate-phase-graph <filename> to better see the problem.
+one error found \ No newline at end of file
diff --git a/test/files/neg/plugin-rafter-before-1.flags b/test/files/neg/plugin-rafter-before-1.flags
new file mode 100644
index 0000000000..8bf03145b9
--- /dev/null
+++ b/test/files/neg/plugin-rafter-before-1.flags
@@ -0,0 +1,2 @@
+-Xplugin:files/neg/plugin-rafter-before-1/lib/plugins.jar
+
diff --git a/test/files/neg/plugin-rightafter-terminal.check b/test/files/neg/plugin-rightafter-terminal.check
new file mode 100644
index 0000000000..8107c373e0
--- /dev/null
+++ b/test/files/neg/plugin-rightafter-terminal.check
@@ -0,0 +1,2 @@
+error: [phase assembly, right after dependency on terminal phase not allowed: rightafterterminal => terminal]
+one error found \ No newline at end of file
diff --git a/test/files/neg/plugin-rightafter-terminal.flags b/test/files/neg/plugin-rightafter-terminal.flags
new file mode 100644
index 0000000000..948a318668
--- /dev/null
+++ b/test/files/neg/plugin-rightafter-terminal.flags
@@ -0,0 +1,2 @@
+-Xplugin:files/neg/plugin-rightafter-terminal/lib/plugins.jar
+