summaryrefslogtreecommitdiffstats
path: root/tests/new
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-08-06 01:53:16 +0000
committerwisberg <wisberg>2003-08-06 01:53:16 +0000
commitc7584070e1ca1e4f1899f4b62e2c193d4d43c206 (patch)
tree2635d3e7689879a9cd38f656bcad86be0204e021 /tests/new
parent40fb45135a9079752db1fc3a984d278d054c6dbb (diff)
downloadaspectj-c7584070e1ca1e4f1899f4b62e2c193d4d43c206.tar.gz
aspectj-c7584070e1ca1e4f1899f4b62e2c193d4d43c206.zip
passing tests for interface libraries. The behavior might be wrong (i.e., some should fail) -- confirming on the list.
Diffstat (limited to 'tests/new')
-rw-r--r--tests/new/interfaceLibrary/Client.java9
-rw-r--r--tests/new/interfaceLibrary/LibraryAspect.java6
-rw-r--r--tests/new/interfaceLibrary/aspectOnly.jarbin0 -> 1027 bytes
-rw-r--r--tests/new/interfaceLibrary/aspectedInterfaceOnly.jarbin0 -> 312 bytes
-rw-r--r--tests/new/interfaceLibrary/aspectedInterfaceOnlyBinary.jarbin0 -> 312 bytes
-rw-r--r--tests/new/interfaceLibrary/build.xml83
-rw-r--r--tests/new/interfaceLibrary/interfaceOnly.jarbin0 -> 263 bytes
-rw-r--r--tests/new/interfaceLibrary/lib/LibraryInterface.java6
8 files changed, 104 insertions, 0 deletions
diff --git a/tests/new/interfaceLibrary/Client.java b/tests/new/interfaceLibrary/Client.java
new file mode 100644
index 000000000..e53bfff21
--- /dev/null
+++ b/tests/new/interfaceLibrary/Client.java
@@ -0,0 +1,9 @@
+
+
+public class Client {
+ public static void main(String[] a) {
+ new C().run();
+ }
+}
+
+class C implements lib.LibraryInterface {} \ No newline at end of file
diff --git a/tests/new/interfaceLibrary/LibraryAspect.java b/tests/new/interfaceLibrary/LibraryAspect.java
new file mode 100644
index 000000000..34a6a36b9
--- /dev/null
+++ b/tests/new/interfaceLibrary/LibraryAspect.java
@@ -0,0 +1,6 @@
+
+aspect LibraryAspect {
+ public void lib.LibraryInterface.run() {
+ System.err.println("LibraryAspect-defined run() for " + this);
+ }
+} \ No newline at end of file
diff --git a/tests/new/interfaceLibrary/aspectOnly.jar b/tests/new/interfaceLibrary/aspectOnly.jar
new file mode 100644
index 000000000..4aaffb645
--- /dev/null
+++ b/tests/new/interfaceLibrary/aspectOnly.jar
Binary files differ
diff --git a/tests/new/interfaceLibrary/aspectedInterfaceOnly.jar b/tests/new/interfaceLibrary/aspectedInterfaceOnly.jar
new file mode 100644
index 000000000..9cb969b9d
--- /dev/null
+++ b/tests/new/interfaceLibrary/aspectedInterfaceOnly.jar
Binary files differ
diff --git a/tests/new/interfaceLibrary/aspectedInterfaceOnlyBinary.jar b/tests/new/interfaceLibrary/aspectedInterfaceOnlyBinary.jar
new file mode 100644
index 000000000..9cb969b9d
--- /dev/null
+++ b/tests/new/interfaceLibrary/aspectedInterfaceOnlyBinary.jar
Binary files differ
diff --git a/tests/new/interfaceLibrary/build.xml b/tests/new/interfaceLibrary/build.xml
new file mode 100644
index 000000000..d23e49e38
--- /dev/null
+++ b/tests/new/interfaceLibrary/build.xml
@@ -0,0 +1,83 @@
+
+<project name="interfaceLibrary" default="build" basedir=".">
+
+
+ <target name="build" depends="init">
+ <iajc
+ classpath="${aspectjrt.jar}"
+ outjar="interfaceOnly.jar"
+ srcdir="."
+ includes="lib/LibraryInterface.java"/>
+
+ <iajc
+ classpath="${aspectjrt.jar}${path.separator}interfaceOnly.jar"
+ outjar="aspectOnly.jar"
+ srcdir="."
+ includes="LibraryAspect.java"/>
+
+ <iajc
+ classpath="${aspectjrt.jar}"
+ aspectpath="aspectOnly.jar"
+ outjar="aspectedInterfaceOnly.jar"
+ srcdir="."
+ includes="lib/LibraryInterface.java"/>
+
+ <iajc
+ classpath="${aspectjrt.jar}"
+ aspectpath="aspectOnly.jar"
+ injars="interfaceOnly.jar"
+ outjar="aspectedInterfaceOnlyBinary.jar"/>
+
+ </target>
+
+ <target name="init" depends="init.variables,init.taskdefs"/>
+
+ <target name="init.variables"
+ description="init variables">
+
+ <!-- required directories - run from examples or predefine -->
+ <property name="interfaceLibrary.dir"
+ location="${basedir}"/>
+ <property name="aspectj.lib.dir"
+ location="${interfaceLibrary.dir}/../../../aj-build/dist/tools/lib"/>
+
+ <!-- required libraries - install or predefine -->
+ <property name="aspectjrt.jar"
+ location="${aspectj.lib.dir}/aspectjrt.jar"/>
+ <property name="aspectjtools.jar"
+ location="${aspectj.lib.dir}/aspectjtools.jar"/>
+
+ <!-- checking required libraries -->
+ <available file="${aspectjtools.jar}"
+ property="aspectjtools.jar.available"/>
+ <available file="${aspectjrt.jar}"
+ property="aspectjrt.jar.available"/>
+
+ </target>
+
+ <target name="init.taskdefs" depends="init.variables,
+ aspectjtools.jar.available,
+ aspectjrt.jar.available"
+ unless="taskdefs.init">
+ <!-- sets name of new task to iajc, old task to ajc -->
+ <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
+ <classpath>
+ <pathelement path="${aspectjtools.jar}"/>
+ </classpath>
+ </taskdef>
+ <property name="taskdefs.init" value="true"/>
+ </target>
+
+ <!-- targets to fail unless required libraries available -->
+
+ <target name="aspectjrt.jar.available" depends="init.variables"
+ unless="aspectjrt.jar.available" >
+ <fail message="expecting aspectjrt.jar at ${aspectjrt.jar}"/>
+ </target>
+
+ <target name="aspectjtools.jar.available" depends="init.variables"
+ unless="aspectjtools.jar.available" >
+ <fail message="expecting aspectjtools.jar at ${aspectjtools.jar}"/>
+ </target>
+
+</project>
diff --git a/tests/new/interfaceLibrary/interfaceOnly.jar b/tests/new/interfaceLibrary/interfaceOnly.jar
new file mode 100644
index 000000000..ede6fc868
--- /dev/null
+++ b/tests/new/interfaceLibrary/interfaceOnly.jar
Binary files differ
diff --git a/tests/new/interfaceLibrary/lib/LibraryInterface.java b/tests/new/interfaceLibrary/lib/LibraryInterface.java
new file mode 100644
index 000000000..a712c5a08
--- /dev/null
+++ b/tests/new/interfaceLibrary/lib/LibraryInterface.java
@@ -0,0 +1,6 @@
+
+package lib;
+
+public interface LibraryInterface {
+// void run();
+} \ No newline at end of file