summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2016-08-31 11:08:26 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2016-09-01 22:38:08 +0200
commit50b71b6c829faabfaa46197572fc4ddd03b7e9c1 (patch)
treee82a4f08b0fafb555d03b0435b66b822911c1dd7 /test/files/neg
parenta980fded6806f83bebe2ced31ab1ed70926254b2 (diff)
downloadscala-50b71b6c829faabfaa46197572fc4ddd03b7e9c1.tar.gz
scala-50b71b6c829faabfaa46197572fc4ddd03b7e9c1.tar.bz2
scala-50b71b6c829faabfaa46197572fc4ddd03b7e9c1.zip
Emit mixin forwarders for JUnit-annotated trait methods by default
JUnit 4 does not support default methods. For better user experience, this commit makes the compiler generate mixin forwarders for inherited trait methods that carry a JUnit annotation. The -Yjunit-trait-methods-no-forwarders flag disables this behavior. This supersedes the scala-js/scala-2.12-junit-mixin-plugin compiler plugin.
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/nowarnDefaultJunitMethods.check6
-rw-r--r--test/files/neg/nowarnDefaultJunitMethods.flags1
-rw-r--r--test/files/neg/nowarnDefaultJunitMethods/C_1.scala5
-rw-r--r--test/files/neg/nowarnDefaultJunitMethods/Test.java3
4 files changed, 0 insertions, 15 deletions
diff --git a/test/files/neg/nowarnDefaultJunitMethods.check b/test/files/neg/nowarnDefaultJunitMethods.check
deleted file mode 100644
index 7efdcc299a..0000000000
--- a/test/files/neg/nowarnDefaultJunitMethods.check
+++ /dev/null
@@ -1,6 +0,0 @@
-C_1.scala:2: warning: JUnit tests in traits that are compiled as default methods are not executed by JUnit 4. JUnit 5 will fix this issue.
- @org.junit.Test def foo = 0
- ^
-error: No warnings can be incurred under -Xfatal-warnings.
-one warning found
-one error found
diff --git a/test/files/neg/nowarnDefaultJunitMethods.flags b/test/files/neg/nowarnDefaultJunitMethods.flags
deleted file mode 100644
index 85d8eb2ba2..0000000000
--- a/test/files/neg/nowarnDefaultJunitMethods.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xfatal-warnings
diff --git a/test/files/neg/nowarnDefaultJunitMethods/C_1.scala b/test/files/neg/nowarnDefaultJunitMethods/C_1.scala
deleted file mode 100644
index e2565a48bc..0000000000
--- a/test/files/neg/nowarnDefaultJunitMethods/C_1.scala
+++ /dev/null
@@ -1,5 +0,0 @@
-trait T {
- @org.junit.Test def foo = 0
-}
-
-class C extends T
diff --git a/test/files/neg/nowarnDefaultJunitMethods/Test.java b/test/files/neg/nowarnDefaultJunitMethods/Test.java
deleted file mode 100644
index e8d64c2cc8..0000000000
--- a/test/files/neg/nowarnDefaultJunitMethods/Test.java
+++ /dev/null
@@ -1,3 +0,0 @@
-package org.junit;
-
-public @interface Test { }