aboutsummaryrefslogtreecommitdiff
path: root/tests/pos-java-interop/t294
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-10-28 22:52:16 +0200
committerGuillaume Martres <smarter@ubuntu.com>2016-11-22 01:35:06 +0100
commit0dc738dd1377577a4004bfe158b11bfb1fa59a9d (patch)
tree0756502d63341e2503254ca19f37693271c31220 /tests/pos-java-interop/t294
parent02a29c9f2127ea7b0cb0b05facd3afe8e2ec256a (diff)
downloaddotty-0dc738dd1377577a4004bfe158b11bfb1fa59a9d.tar.gz
dotty-0dc738dd1377577a4004bfe158b11bfb1fa59a9d.tar.bz2
dotty-0dc738dd1377577a4004bfe158b11bfb1fa59a9d.zip
Fix partest compilation of java-interop tests by moving them
Previously, the tests where all in tests/pos/java-interop which means that partest would try to run them as one single test, this failed because some of these tests define classes with the same name. We could fix this by putting them all in separate packages but for now it's simple to move them to tests/pos-java-interop (they will still be run individually as they should thanks to the `java_all` test defined in tests.scala)
Diffstat (limited to 'tests/pos-java-interop/t294')
-rw-r--r--tests/pos-java-interop/t294/Ann.java3
-rw-r--r--tests/pos-java-interop/t294/Ann2.java3
-rw-r--r--tests/pos-java-interop/t294/Test_1.scala7
-rw-r--r--tests/pos-java-interop/t294/Test_2.scala1
4 files changed, 14 insertions, 0 deletions
diff --git a/tests/pos-java-interop/t294/Ann.java b/tests/pos-java-interop/t294/Ann.java
new file mode 100644
index 000000000..934ca4629
--- /dev/null
+++ b/tests/pos-java-interop/t294/Ann.java
@@ -0,0 +1,3 @@
+public @interface Ann {
+ public Ann2[] nested();
+}
diff --git a/tests/pos-java-interop/t294/Ann2.java b/tests/pos-java-interop/t294/Ann2.java
new file mode 100644
index 000000000..025b79e79
--- /dev/null
+++ b/tests/pos-java-interop/t294/Ann2.java
@@ -0,0 +1,3 @@
+public @interface Ann2 {
+ public int value();
+}
diff --git a/tests/pos-java-interop/t294/Test_1.scala b/tests/pos-java-interop/t294/Test_1.scala
new file mode 100644
index 000000000..ff1f34b10
--- /dev/null
+++ b/tests/pos-java-interop/t294/Test_1.scala
@@ -0,0 +1,7 @@
+// also test pickling of java annotations; Test_2.scala will
+// read this class file
+@Ann(nested = Array(new Ann2(10))) class Test {
+ @Ann2(100) var ctx: Object = _
+ @Ann(nested = Array()) def foo = 10
+ @Ann(nested = Array(new Ann2(10), new Ann2(23))) val bam = -3
+}
diff --git a/tests/pos-java-interop/t294/Test_2.scala b/tests/pos-java-interop/t294/Test_2.scala
new file mode 100644
index 000000000..9fb1c6e17
--- /dev/null
+++ b/tests/pos-java-interop/t294/Test_2.scala
@@ -0,0 +1 @@
+class Test2 extends Test