summaryrefslogtreecommitdiff
path: root/test/support
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-04-05 06:24:22 +0000
committerPaul Phillips <paulp@improving.org>2010-04-05 06:24:22 +0000
commite8a121e9e1ade3f283f42fceb3c18f30a8468f57 (patch)
treefc58111a69bb8940f7c5bd341fa3a8f097955403 /test/support
parent28ed5c6b216463a6e5bd8f06986c35a2036bda3f (diff)
downloadscala-e8a121e9e1ade3f283f42fceb3c18f30a8468f57.tar.gz
scala-e8a121e9e1ade3f283f42fceb3c18f30a8468f57.tar.bz2
scala-e8a121e9e1ade3f283f42fceb3c18f30a8468f57.zip
If I work on this patch any longer without chec...
If I work on this patch any longer without checking in I will go stark raving mad. It is broken up into a couple pieces. This one is the changes to test/. It includes fixing a bunch of tests, removing deprecated constructs, moving jars used by tests to the most specific plausible location rather than having all jars on the classpath of all tests, and some filesystem layout change (continuations get their whole own srcpath.) This would be the world's most tedious review, so let's say no review. [Note: after this commit, I doubt things will build very smoothly until the rest of the partest changes follow. Which should only be seconds, but just in case.]
Diffstat (limited to 'test/support')
-rw-r--r--test/support/annotations/NestedAnnotations.java25
-rw-r--r--test/support/annotations/OuterEnum.java5
-rw-r--r--test/support/annotations/OuterTParams.java6
-rw-r--r--test/support/annotations/SourceAnnotation.java9
-rwxr-xr-xtest/support/annotations/mkAnnotationsJar.sh28
5 files changed, 73 insertions, 0 deletions
diff --git a/test/support/annotations/NestedAnnotations.java b/test/support/annotations/NestedAnnotations.java
new file mode 100644
index 0000000000..8f2327dcce
--- /dev/null
+++ b/test/support/annotations/NestedAnnotations.java
@@ -0,0 +1,25 @@
+package test;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+public class NestedAnnotations {
+
+ @OuterAnno(inner=@InnerAnno(name="inner"))
+ String field;
+
+ @Target({FIELD})
+ @Retention(RUNTIME)
+ public static @interface InnerAnno {
+ String name();
+ }
+
+ @Target({FIELD})
+ @Retention(RUNTIME)
+ public static @interface OuterAnno {
+ InnerAnno inner();
+ }
+}
diff --git a/test/support/annotations/OuterEnum.java b/test/support/annotations/OuterEnum.java
new file mode 100644
index 0000000000..75d3f34223
--- /dev/null
+++ b/test/support/annotations/OuterEnum.java
@@ -0,0 +1,5 @@
+package enums;
+
+public class OuterEnum {
+ public enum Foo { Bar }
+}
diff --git a/test/support/annotations/OuterTParams.java b/test/support/annotations/OuterTParams.java
new file mode 100644
index 0000000000..1d3db49fcf
--- /dev/null
+++ b/test/support/annotations/OuterTParams.java
@@ -0,0 +1,6 @@
+public class OuterTParams<A> {
+ class InnerClass {
+ // Cannot parse method signature: "()TA;"
+ public A method() { return null; }
+ }
+}
diff --git a/test/support/annotations/SourceAnnotation.java b/test/support/annotations/SourceAnnotation.java
new file mode 100644
index 0000000000..047751ddfe
--- /dev/null
+++ b/test/support/annotations/SourceAnnotation.java
@@ -0,0 +1,9 @@
+package test;
+
+import java.lang.annotation.*;
+
+@Retention(value=RetentionPolicy.RUNTIME)
+public @interface SourceAnnotation {
+ public String value();
+ public String[] mails() default { "bill.gates@bloodsuckers.com" };
+}
diff --git a/test/support/annotations/mkAnnotationsJar.sh b/test/support/annotations/mkAnnotationsJar.sh
new file mode 100755
index 0000000000..3d69351165
--- /dev/null
+++ b/test/support/annotations/mkAnnotationsJar.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+##############################################################################
+# Author : Nikolay Mihaylov
+##############################################################################
+
+##############################################################################
+# variables
+
+OBJDIR=./classes
+
+if [ -z "${JAVA_HOME}" ]; then
+ echo "environment variable JAVA_HOME is undefined."
+ exit
+fi
+
+JAVAC=${JAVA_HOME}/bin/javac
+JAVAC_OPTIONS="-source 1.5 -target 1.5"
+
+JAR=${JAVA_HOME}/bin/jar
+
+##############################################################################
+# commands
+
+mkdir -p ${OBJDIR}
+${JAVAC} ${JAVAC_OPTIONS} -d ${OBJDIR} SourceAnnotation.java NestedAnnotations.java
+${JAR} cf ../lib/annotations.jar -C ${OBJDIR} .
+rm -rf ${OBJDIR}