summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2007-02-18 14:25:35 +0000
committermihaylov <mihaylov@epfl.ch>2007-02-18 14:25:35 +0000
commit1614f42a20c5a286bac169ef354bf057f9104a3b (patch)
tree3352e0c6516f2153b9bd5309cf4646878389070b /test
parent6c26499a9e7c566e4de4e60d0a69193027b6e01a (diff)
downloadscala-1614f42a20c5a286bac169ef354bf057f9104a3b.tar.gz
scala-1614f42a20c5a286bac169ef354bf057f9104a3b.tar.bz2
scala-1614f42a20c5a286bac169ef354bf057f9104a3b.zip
Improved annotations test
Diffstat (limited to 'test')
-rw-r--r--test/files/jvm5/Source.java9
-rw-r--r--test/files/jvm5/attributes.check2
-rw-r--r--test/files/jvm5/attributes.scala13
-rw-r--r--test/files/lib/annotations.jar.desired.sha11
-rw-r--r--test/files/lib/nest.jar.desired.sha1 (renamed from test/files/jvm/lib/nest.jar.desired.sha1)0
-rwxr-xr-xtest/scalatest2
6 files changed, 20 insertions, 7 deletions
diff --git a/test/files/jvm5/Source.java b/test/files/jvm5/Source.java
new file mode 100644
index 0000000000..36cf37ad3d
--- /dev/null
+++ b/test/files/jvm5/Source.java
@@ -0,0 +1,9 @@
+//package attributes;
+
+import java.lang.annotation.*;
+
+@Retention(value=RetentionPolicy.RUNTIME)
+@interface Source {
+ public String url();
+ public String mail();
+}
diff --git a/test/files/jvm5/attributes.check b/test/files/jvm5/attributes.check
index 2793231eac..35d0c8212d 100644
--- a/test/files/jvm5/attributes.check
+++ b/test/files/jvm5/attributes.check
@@ -1,2 +1,4 @@
class java.rmi.RemoteException
class java.io.IOException
+@java.lang.Deprecated()
+@Source(url=http://scala.epfl.ch, mail=scala@lists.epfl.ch)
diff --git a/test/files/jvm5/attributes.scala b/test/files/jvm5/attributes.scala
index 59e5e4facd..b3fa59f1cc 100644
--- a/test/files/jvm5/attributes.scala
+++ b/test/files/jvm5/attributes.scala
@@ -67,10 +67,11 @@ public class Main {
}
*/
object Test4 {
- import java.lang.annotation._
- @Retention(RetentionPolicy.RUNTIME)
- class Source(url: String, mail: String) extends scala.Annotation
- @Source("http://scala.epfl.ch", "scala@lists.epfl.ch")
+ //import java.lang.annotation._
+ //@Retention(RetentionPolicy.RUNTIME)
+ //class Source(url: String, mail: String) extends scala.Annotation
+ //import Source
+ @Source(){val url = "http://scala.epfl.ch", val mail = "scala@lists.epfl.ch"}
class Foo
def run: Unit = {
val clazz = classOf[Foo]
@@ -82,7 +83,7 @@ object Test {
def main(args: Array[String]): Unit = {
Test1.run
Test2.run
- //Test3.run // requires the use of -target:jvm-1.5
- //Test4.run
+ Test3.run // requires the use of -target:jvm-1.5
+ Test4.run
}
}
diff --git a/test/files/lib/annotations.jar.desired.sha1 b/test/files/lib/annotations.jar.desired.sha1
new file mode 100644
index 0000000000..e67a34a1f3
--- /dev/null
+++ b/test/files/lib/annotations.jar.desired.sha1
@@ -0,0 +1 @@
+11f9e02bcb7332d5acccbb6dde233c722131747e ?annotations.jar
diff --git a/test/files/jvm/lib/nest.jar.desired.sha1 b/test/files/lib/nest.jar.desired.sha1
index 13801689cd..13801689cd 100644
--- a/test/files/jvm/lib/nest.jar.desired.sha1
+++ b/test/files/lib/nest.jar.desired.sha1
diff --git a/test/scalatest b/test/scalatest
index 38fe3814c5..e37d60c6c8 100755
--- a/test/scalatest
+++ b/test/scalatest
@@ -572,7 +572,7 @@ FILES_ANT="";
QUICK="$PREFIX/build/quick/bin"
QUICK_LIB="$PREFIX/build/quick/lib/library"
-JVM_EXT_CLASSPATH=`get_ext_classpath $TESTROOT/files/jvm/lib`
+JVM_EXT_CLASSPATH=`get_ext_classpath $TESTROOT/files/lib`
if [ -d "$PREFIX/dists" ]; then
LATEST="$PREFIX/dists/latest/bin";