summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2013-02-01 19:23:00 +0100
committerEugene Burmako <xeno.by@gmail.com>2013-02-01 20:52:12 +0100
commitadf50a3ac0c6861a77a781abc0814c5d17927175 (patch)
treeb77039cf8d33b98f70c64149834fd38ecfc268ef /test
parentf1701f704a2485fcc2eb6d5d8b5d0228beddd9b3 (diff)
downloadscala-adf50a3ac0c6861a77a781abc0814c5d17927175.tar.gz
scala-adf50a3ac0c6861a77a781abc0814c5d17927175.tar.bz2
scala-adf50a3ac0c6861a77a781abc0814c5d17927175.zip
evicts javac-artifacts.jar
Apparently, the usual _1, _2, _3... naming scheme also works for java files, which need to be compiled together with partests. This allows us to get rid of javac-artifacts.jar.
Diffstat (limited to 'test')
-rw-r--r--test/files/lib/javac-artifacts.jar.desired.sha11
-rw-r--r--test/files/run/reflection-java-annotations.check2
-rw-r--r--test/files/run/reflection-java-annotations/JavaAnnottee_1.java47
-rw-r--r--test/files/run/reflection-java-annotations/JavaComplexAnnotation_1.java34
-rw-r--r--test/files/run/reflection-java-annotations/JavaSimpleAnnotation_1.java21
-rw-r--r--test/files/run/reflection-java-annotations/JavaSimpleEnumeration_1.java4
-rw-r--r--test/files/run/reflection-java-annotations/Test_2.scala (renamed from test/files/run/reflection-java-annotations.scala)2
-rw-r--r--test/files/run/reflection-java-crtp/JavaSimpleEnumeration_1.java4
-rw-r--r--test/files/run/reflection-java-crtp/Main_2.scala (renamed from test/files/run/reflection-java-crtp.scala)2
-rw-r--r--test/files/run/t6548.check2
-rw-r--r--test/files/run/t6548/JavaAnnotationWithNestedEnum_1.java17
-rw-r--r--test/files/run/t6548/Test_2.scala (renamed from test/files/run/t6548.scala)2
-rw-r--r--test/files/run/t7008/Impls_Macros_2.scala (renamed from test/files/run/t7008/Impls_Macros_1.scala)2
-rw-r--r--test/files/run/t7008/JavaClassWithCheckedExceptions_1.java7
-rw-r--r--test/files/run/t7008/Test_3.scala (renamed from test/files/run/t7008/Test_2.scala)2
15 files changed, 141 insertions, 8 deletions
diff --git a/test/files/lib/javac-artifacts.jar.desired.sha1 b/test/files/lib/javac-artifacts.jar.desired.sha1
deleted file mode 100644
index 508141b771..0000000000
--- a/test/files/lib/javac-artifacts.jar.desired.sha1
+++ /dev/null
@@ -1 +0,0 @@
-a05ca69ac68fa7006b1b8ed98597046e105b4047 ?javac-artifacts.jar
diff --git a/test/files/run/reflection-java-annotations.check b/test/files/run/reflection-java-annotations.check
index 53c53cfbcc..2d37fff1f4 100644
--- a/test/files/run/reflection-java-annotations.check
+++ b/test/files/run/reflection-java-annotations.check
@@ -1 +1 @@
-List(JavaComplexAnnotation(v1 = 1, v10 = "hello", v101 = [101, 101], v102 = [102, 102], v103 = ['g', 'g'], v104 = [104, 104], v105 = [105L, 105L], v106 = [106.0, 106.0], v107 = [107.0, 107.0], v108 = [false, true], v11 = classOf[JavaAnnottee], v110 = ["hello", "world"], v111 = [classOf[JavaSimpleAnnotation], classOf[JavaComplexAnnotation]], v112 = [FOO, BAR], v113 = [JavaSimpleAnnotation(v1 = 21, v10 = "world2", v11 = classOf[JavaComplexAnnotation], v12 = BAR, v2 = 22, v3 = '\027', v4 = 24, v5 = 25L, v6 = 26.0, v7 = 27.0, v8 = false)], v12 = FOO, v13 = JavaSimpleAnnotation(v1 = 11, v10 = "world1", v11 = classOf[JavaSimpleAnnotation], v12 = FOO, v2 = 12, v3 = '\r', v4 = 14, v5 = 15L, v6 = 16.0, v7 = 17.0, v8 = false), v2 = 2, v3 = '\03', v4 = 4, v5 = 5L, v6 = 6.0, v7 = 7.0, v8 = false))
+List(JavaComplexAnnotation_1(v1 = 1, v10 = "hello", v101 = [101, 101], v102 = [102, 102], v103 = ['g', 'g'], v104 = [104, 104], v105 = [105L, 105L], v106 = [106.0, 106.0], v107 = [107.0, 107.0], v108 = [false, true], v11 = classOf[JavaAnnottee_1], v110 = ["hello", "world"], v111 = [classOf[JavaSimpleAnnotation_1], classOf[JavaComplexAnnotation_1]], v112 = [FOO, BAR], v113 = [JavaSimpleAnnotation_1(v1 = 21, v10 = "world2", v11 = classOf[JavaComplexAnnotation_1], v12 = BAR, v2 = 22, v3 = '\027', v4 = 24, v5 = 25L, v6 = 26.0, v7 = 27.0, v8 = false)], v12 = FOO, v13 = JavaSimpleAnnotation_1(v1 = 11, v10 = "world1", v11 = classOf[JavaSimpleAnnotation_1], v12 = FOO, v2 = 12, v3 = '\r', v4 = 14, v5 = 15L, v6 = 16.0, v7 = 17.0, v8 = false), v2 = 2, v3 = '\03', v4 = 4, v5 = 5L, v6 = 6.0, v7 = 7.0, v8 = false))
diff --git a/test/files/run/reflection-java-annotations/JavaAnnottee_1.java b/test/files/run/reflection-java-annotations/JavaAnnottee_1.java
new file mode 100644
index 0000000000..b241f5d25e
--- /dev/null
+++ b/test/files/run/reflection-java-annotations/JavaAnnottee_1.java
@@ -0,0 +1,47 @@
+@JavaComplexAnnotation_1(
+ v1 = (byte)1,
+ v2 = (short)2,
+ v3 = (char)3,
+ v4 = (int)4,
+ v5 = (long)5,
+ v6 = (float)6,
+ v7 = (double)7,
+ v10 = "hello",
+ v11 = JavaAnnottee_1.class,
+ v12 = JavaSimpleEnumeration_1.FOO,
+ v13 = @JavaSimpleAnnotation_1(
+ v1 = (byte)11,
+ v2 = (short)12,
+ v3 = (char)13,
+ v4 = (int)14,
+ v5 = (long)15,
+ v6 = (float)16,
+ v7 = (double)17,
+ v10 = "world1",
+ v11 = JavaSimpleAnnotation_1.class,
+ v12 = JavaSimpleEnumeration_1.FOO
+ ),
+ v101 = {(byte)101, (byte)101},
+ v102 = {(short)102, (short)102},
+ v103 = {(char)103, (char)103},
+ v104 = {(int)104, (int)104},
+ v105 = {(long)105, (long)105},
+ v106 = {(float)106, (float)106},
+ v107 = {(double)107, (double)107},
+ v108 = {false, true},
+ v110 = {"hello", "world"},
+ v111 = {JavaSimpleAnnotation_1.class, JavaComplexAnnotation_1.class},
+ v112 = {JavaSimpleEnumeration_1.FOO, JavaSimpleEnumeration_1.BAR},
+ v113 = {@JavaSimpleAnnotation_1(
+ v1 = (byte)21,
+ v2 = (short)22,
+ v3 = (char)23,
+ v4 = (int)24,
+ v5 = (long)25,
+ v6 = (float)26,
+ v7 = (double)27,
+ v10 = "world2",
+ v11 = JavaComplexAnnotation_1.class,
+ v12 = JavaSimpleEnumeration_1.BAR
+ )})
+public class JavaAnnottee_1 {} \ No newline at end of file
diff --git a/test/files/run/reflection-java-annotations/JavaComplexAnnotation_1.java b/test/files/run/reflection-java-annotations/JavaComplexAnnotation_1.java
new file mode 100644
index 0000000000..645eeb9399
--- /dev/null
+++ b/test/files/run/reflection-java-annotations/JavaComplexAnnotation_1.java
@@ -0,0 +1,34 @@
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.TYPE})
+public @interface JavaComplexAnnotation_1 {
+ byte v1();
+ short v2();
+ char v3();
+ int v4();
+ long v5();
+ float v6();
+ double v7();
+ boolean v8() default false;
+ // void v9();
+ String v10();
+ Class<?> v11();
+ JavaSimpleEnumeration_1 v12();
+ JavaSimpleAnnotation_1 v13();
+ byte[] v101();
+ short[] v102();
+ char[] v103();
+ int[] v104();
+ long[] v105();
+ float[] v106();
+ double[] v107();
+ boolean[] v108();
+ String[] v110();
+ Class<?>[] v111();
+ JavaSimpleEnumeration_1[] v112();
+ JavaSimpleAnnotation_1[] v113();
+} \ No newline at end of file
diff --git a/test/files/run/reflection-java-annotations/JavaSimpleAnnotation_1.java b/test/files/run/reflection-java-annotations/JavaSimpleAnnotation_1.java
new file mode 100644
index 0000000000..c0f92fad2c
--- /dev/null
+++ b/test/files/run/reflection-java-annotations/JavaSimpleAnnotation_1.java
@@ -0,0 +1,21 @@
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.TYPE})
+public @interface JavaSimpleAnnotation_1 {
+ byte v1();
+ short v2();
+ char v3();
+ int v4();
+ long v5();
+ float v6();
+ double v7();
+ boolean v8() default false;
+ // void v9();
+ String v10();
+ Class<?> v11();
+ JavaSimpleEnumeration_1 v12();
+} \ No newline at end of file
diff --git a/test/files/run/reflection-java-annotations/JavaSimpleEnumeration_1.java b/test/files/run/reflection-java-annotations/JavaSimpleEnumeration_1.java
new file mode 100644
index 0000000000..39246141cc
--- /dev/null
+++ b/test/files/run/reflection-java-annotations/JavaSimpleEnumeration_1.java
@@ -0,0 +1,4 @@
+enum JavaSimpleEnumeration_1 {
+ FOO,
+ BAR
+} \ No newline at end of file
diff --git a/test/files/run/reflection-java-annotations.scala b/test/files/run/reflection-java-annotations/Test_2.scala
index 2e3fed48ce..d2c3157071 100644
--- a/test/files/run/reflection-java-annotations.scala
+++ b/test/files/run/reflection-java-annotations/Test_2.scala
@@ -1,6 +1,6 @@
object Test extends App {
import scala.reflect.runtime.universe._
- val sym = typeOf[JavaAnnottee].typeSymbol
+ val sym = typeOf[JavaAnnottee_1].typeSymbol
sym.typeSignature
sym.annotations foreach (_.javaArgs)
println(sym.annotations)
diff --git a/test/files/run/reflection-java-crtp/JavaSimpleEnumeration_1.java b/test/files/run/reflection-java-crtp/JavaSimpleEnumeration_1.java
new file mode 100644
index 0000000000..39246141cc
--- /dev/null
+++ b/test/files/run/reflection-java-crtp/JavaSimpleEnumeration_1.java
@@ -0,0 +1,4 @@
+enum JavaSimpleEnumeration_1 {
+ FOO,
+ BAR
+} \ No newline at end of file
diff --git a/test/files/run/reflection-java-crtp.scala b/test/files/run/reflection-java-crtp/Main_2.scala
index 260d3540dc..fb5668f323 100644
--- a/test/files/run/reflection-java-crtp.scala
+++ b/test/files/run/reflection-java-crtp/Main_2.scala
@@ -1,6 +1,6 @@
object Test extends App {
import scala.reflect.runtime.universe._
- val enum = typeOf[JavaSimpleEnumeration].baseClasses(1).asClass
+ val enum = typeOf[JavaSimpleEnumeration_1].baseClasses(1).asClass
// make sure that the E's in Enum<E extends Enum<E>> are represented by the same symbol
val e1 = enum.typeParams(0).asType
val TypeBounds(_, TypeRef(_, _, List(TypeRef(_, e2: TypeSymbol, _)))) = e1.typeSignature
diff --git a/test/files/run/t6548.check b/test/files/run/t6548.check
index e82cae110a..5dfcb12e02 100644
--- a/test/files/run/t6548.check
+++ b/test/files/run/t6548.check
@@ -1,2 +1,2 @@
false
-List(JavaAnnotationWithNestedEnum(value = VALUE))
+List(JavaAnnotationWithNestedEnum_1(value = VALUE))
diff --git a/test/files/run/t6548/JavaAnnotationWithNestedEnum_1.java b/test/files/run/t6548/JavaAnnotationWithNestedEnum_1.java
new file mode 100644
index 0000000000..32004de537
--- /dev/null
+++ b/test/files/run/t6548/JavaAnnotationWithNestedEnum_1.java
@@ -0,0 +1,17 @@
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD,
+ ElementType.TYPE, ElementType.PARAMETER})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface JavaAnnotationWithNestedEnum_1
+{
+ public Value value() default Value.VALUE;
+
+ public enum Value
+ {
+ VALUE;
+ }
+} \ No newline at end of file
diff --git a/test/files/run/t6548.scala b/test/files/run/t6548/Test_2.scala
index be3eb5b932..6e4f6ba92a 100644
--- a/test/files/run/t6548.scala
+++ b/test/files/run/t6548/Test_2.scala
@@ -2,7 +2,7 @@ import scala.reflect.runtime.universe._
import scala.reflect.runtime.{currentMirror => cm}
class Bean {
- @JavaAnnotationWithNestedEnum(JavaAnnotationWithNestedEnum.Value.VALUE)
+ @JavaAnnotationWithNestedEnum_1(JavaAnnotationWithNestedEnum_1.Value.VALUE)
def value = 1
}
diff --git a/test/files/run/t7008/Impls_Macros_1.scala b/test/files/run/t7008/Impls_Macros_2.scala
index f2eb7425f5..7a17314085 100644
--- a/test/files/run/t7008/Impls_Macros_1.scala
+++ b/test/files/run/t7008/Impls_Macros_2.scala
@@ -3,7 +3,7 @@ import scala.reflect.macros.Context
object Macros {
def impl(c: Context) = {
- val decls = c.typeOf[JavaClassWithCheckedExceptions[_]].declarations.toList
+ val decls = c.typeOf[JavaClassWithCheckedExceptions_1[_]].declarations.toList
val s = decls.sortBy(_.name.toString).map(decl => (s"${decl.name}: ${decl.annotations}")).mkString(scala.compat.Platform.EOL)
c.universe.reify(println(c.literal(s).splice))
}
diff --git a/test/files/run/t7008/JavaClassWithCheckedExceptions_1.java b/test/files/run/t7008/JavaClassWithCheckedExceptions_1.java
new file mode 100644
index 0000000000..dda2128302
--- /dev/null
+++ b/test/files/run/t7008/JavaClassWithCheckedExceptions_1.java
@@ -0,0 +1,7 @@
+class JavaClassWithCheckedExceptions_1<E1 extends Exception> {
+ public JavaClassWithCheckedExceptions_1() throws NullPointerException {}
+
+ public void bar() throws E1 {}
+ public void baz(int x) throws IllegalStateException {}
+ public <E2 extends Exception> void foo() throws E2 {}
+} \ No newline at end of file
diff --git a/test/files/run/t7008/Test_2.scala b/test/files/run/t7008/Test_3.scala
index b67faa327f..b2961a829e 100644
--- a/test/files/run/t7008/Test_2.scala
+++ b/test/files/run/t7008/Test_3.scala
@@ -4,6 +4,6 @@ object Test extends App {
Macros.foo
println("=============")
- val decls = typeOf[JavaClassWithCheckedExceptions[_]].declarations.toList
+ val decls = typeOf[JavaClassWithCheckedExceptions_1[_]].declarations.toList
decls sortBy (_.name.toString) foreach (decl => println(s"${decl.name}: ${decl.annotations}"))
} \ No newline at end of file