diff options
author | Som Snytt <som.snytt@gmail.com> | 2013-03-27 16:36:17 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-04-04 10:57:42 -0700 |
commit | 0d954431ea8a75abfadbe198232fd39fff3ceeac (patch) | |
tree | f4a15ae405c2eec3b500ff2b0905073903f7151e /test/files/neg | |
parent | c6ce61796f66770ca1b4d63fc0a569f064436433 (diff) | |
download | scala-0d954431ea8a75abfadbe198232fd39fff3ceeac.tar.gz scala-0d954431ea8a75abfadbe198232fd39fff3ceeac.tar.bz2 scala-0d954431ea8a75abfadbe198232fd39fff3ceeac.zip |
SI-6289 Paulptest demonstrating javac errors
This is Paul's test demonstrating that Javac errors are
correctly transcribed in the test transcript.
A gratuitous Scala class is added to a later round to
show that the test halts after the first error.
The runner must supply absolute paths to javac so that
absolute paths are reported in errors and stripped away
by partest.
The check file is differentiated for Java 6 and 7,
and partest's runner will now post-process the
`diff log check` to strip the diff which does not apply.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/javac-error.check | 10 | ||||
-rw-r--r-- | test/files/neg/javac-error.flags | 1 | ||||
-rw-r--r-- | test/files/neg/javac-error/J.java | 5 | ||||
-rw-r--r-- | test/files/neg/javac-error/SUT_5.scala | 5 |
4 files changed, 21 insertions, 0 deletions
diff --git a/test/files/neg/javac-error.check b/test/files/neg/javac-error.check new file mode 100644 index 0000000000..e7d1ccc1a1 --- /dev/null +++ b/test/files/neg/javac-error.check @@ -0,0 +1,10 @@ +#partest java6 +javac-error/J.java:2: method does not override or implement a method from a supertype + @Override public void foo() { } + ^ +1 error +#partest java7 +javac-error/J.java:2: error: method does not override or implement a method from a supertype + @Override public void foo() { } + ^ +1 error diff --git a/test/files/neg/javac-error.flags b/test/files/neg/javac-error.flags new file mode 100644 index 0000000000..85d8eb2ba2 --- /dev/null +++ b/test/files/neg/javac-error.flags @@ -0,0 +1 @@ +-Xfatal-warnings diff --git a/test/files/neg/javac-error/J.java b/test/files/neg/javac-error/J.java new file mode 100644 index 0000000000..83f50c9ae2 --- /dev/null +++ b/test/files/neg/javac-error/J.java @@ -0,0 +1,5 @@ +public class J { + @Override public void foo() { } + + public void bar() { foo(); } +} diff --git a/test/files/neg/javac-error/SUT_5.scala b/test/files/neg/javac-error/SUT_5.scala new file mode 100644 index 0000000000..0a996352c0 --- /dev/null +++ b/test/files/neg/javac-error/SUT_5.scala @@ -0,0 +1,5 @@ + +/** The System Under Test. + * We bail on the earlier round that generates the first error. + */ +class SUT extends J |