diff options
author | Samuel Gruetter <samuel.gruetter@epfl.ch> | 2014-03-12 22:44:33 +0100 |
---|---|---|
committer | Samuel Gruetter <samuel.gruetter@epfl.ch> | 2014-03-12 22:44:33 +0100 |
commit | 9ef5f6817688f814a3450126aa7383b0928e80a0 (patch) | |
tree | 5727a2f7f7fd665cefdb312af2785c692f04377c /tests/untried/neg/t6446-list | |
parent | 194be919664447631ba55446eb4874979c908d27 (diff) | |
download | dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.gz dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.bz2 dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.zip |
add tests from scala/test/files/{pos,neg}
with explicit Unit return type
Diffstat (limited to 'tests/untried/neg/t6446-list')
-rw-r--r-- | tests/untried/neg/t6446-list/ploogin_1.scala | 31 | ||||
-rw-r--r-- | tests/untried/neg/t6446-list/sample_2.flags | 1 | ||||
-rw-r--r-- | tests/untried/neg/t6446-list/sample_2.scala | 6 | ||||
-rw-r--r-- | tests/untried/neg/t6446-list/scalac-plugin.xml | 4 |
4 files changed, 42 insertions, 0 deletions
diff --git a/tests/untried/neg/t6446-list/ploogin_1.scala b/tests/untried/neg/t6446-list/ploogin_1.scala new file mode 100644 index 000000000..dbf433f9a --- /dev/null +++ b/tests/untried/neg/t6446-list/ploogin_1.scala @@ -0,0 +1,31 @@ + +package t6446 + +import scala.tools.nsc.{ Global, Phase } +import scala.tools.nsc.plugins.{ Plugin, PluginComponent } +import scala.reflect.io.Path +import scala.reflect.io.File + +/** A test plugin. */ +class Ploogin(val global: Global) extends Plugin { + import global._ + + val name = "ploogin" + val description = "A sample plugin for testing." + val components = List[PluginComponent](TestComponent) + + private object TestComponent extends PluginComponent { + val global: Ploogin.this.global.type = Ploogin.this.global + //override val runsBefore = List("refchecks") + val runsAfter = List("jvm") + val phaseName = Ploogin.this.name + override def description = "A sample phase that does so many things it's kind of hard to describe briefly." + def newPhase(prev: Phase) = new TestPhase(prev) + class TestPhase(prev: Phase) extends StdPhase(prev) { + override def description = TestComponent.this.description + def apply(unit: CompilationUnit): Unit = { + // kewl kode + } + } + } +} diff --git a/tests/untried/neg/t6446-list/sample_2.flags b/tests/untried/neg/t6446-list/sample_2.flags new file mode 100644 index 000000000..9cb323296 --- /dev/null +++ b/tests/untried/neg/t6446-list/sample_2.flags @@ -0,0 +1 @@ +-Xplugin:. -Xplugin-list diff --git a/tests/untried/neg/t6446-list/sample_2.scala b/tests/untried/neg/t6446-list/sample_2.scala new file mode 100644 index 000000000..73cdc64e4 --- /dev/null +++ b/tests/untried/neg/t6446-list/sample_2.scala @@ -0,0 +1,6 @@ + +package sample + +// just a sample that is compiled with the sample plugin enabled +object Sample extends App { +} diff --git a/tests/untried/neg/t6446-list/scalac-plugin.xml b/tests/untried/neg/t6446-list/scalac-plugin.xml new file mode 100644 index 000000000..e849bb591 --- /dev/null +++ b/tests/untried/neg/t6446-list/scalac-plugin.xml @@ -0,0 +1,4 @@ +<plugin> +<name>sample-plugin</name> +<classname>t6446.Ploogin</classname> +</plugin> |