--- /dev/null
+
+import org.aspectj.testing.Tester;
+import jar.required.Global;
+import classfile.required.ClassFile;
+
+public class AspectMain {
+ public static void main (String[] args) {
+ Tester.expectEvent("aspect");
+ Tester.check(ClassFile.isTrue(), "not ClassFile.isTrue()?");
+ Tester.check(Global.isTrue(), "not Global.isTrue()?");
+ // aspect advises this invocation, adds "aspect" event
+ new Runnable() { public void run(){}}.run();
+ Tester.checkAllEvents();
+ }
+}
--- /dev/null
+
+<!-- ========================================================================= -->
+<!-- Copyright (c) 2002 Wes Isberg -->
+<!-- All rights reserved. -->
+<!-- This program and the accompanying materials are made available -->
+<!-- under the terms of the Common Public License v1.0 -->
+<!-- which accompanies this distribution and is available at -->
+<!-- http://www.eclipse.org/legal/cpl-v10.html -->
+<!-- -->
+<!-- Contributors: -->
+<!-- Xerox/PARC initial implementation -->
+<!-- ========================================================================= -->
+
+<project name="classpath-test" default="all" basedir=".">
+
+
+ <target name="init.variables"
+ description="setup variables - user defines aspectj.lib.dir">
+
+ <!-- required directories - run from examples or predefine -->
+ <property name="test.base.dir"
+ location="${basedir}/.."/>
+ <property name="classes.dir"
+ location="${test.base.dir}/classesDir"/>
+ <property name="jar.dir"
+ location="${test.base.dir}/jars"/>
+
+
+ <!-- caller must define aspectj.lib.dir -->
+ <property name="aspectj.lib.dir"
+ location="lib"/>
+ <property name="aspectjrt.jar"
+ location="${aspectj.lib.dir}/aspectjrt.jar"/>
+ <available file="${aspectjrt.jar}"
+ property="aspectjrt.jar.available"/>
+ <fail unless="aspectjrt.jar.available"
+ message="expecting aspectjrt.jar at ${aspectjrt.jar}"/>
+
+ <property name="aspectjtools.jar"
+ location="${aspectj.lib.dir}/aspectjtools.jar"/>
+ <available file="${aspectjtools.jar}"
+ property="aspectjtools.jar.available"/>
+ <fail unless="aspectjtools.jar.available"
+ message="expecting aspectjtools.jar at ${aspectjtools.jar}"/>
+
+ <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
+ <classpath>
+ <pathelement path="${aspectjtools.jar}"/>
+ </classpath>
+ </taskdef>
+
+ </target>
+ <target name="all" depends="init.variables"
+ description="build classes, required.jar and requiredAspects.jar">
+ <iajc outjar="${jar.dir}/required.jar"
+ sourceroots="${test.base.dir}/classpath-src/classjar">
+ <classpath>
+ <pathelement path="${aspectjrt.jar}"/>
+ </classpath>
+ </iajc>
+
+ <iajc outjar="${jar.dir}/requiredAspects.jar"
+ sourceroots="${test.base.dir}/classpath-src/aspectjar">
+ <classpath>
+ <pathelement path="${aspectjrt.jar}"/>
+ <pathelement path="${test.base.dir}/../../../lib/test/testing-client.jar"/>
+ </classpath>
+ </iajc>
+
+ <delete>
+ <fileset dir="${classes.dir}" includes="**/*"/>
+ </delete>
+ <iajc destdir="${classes.dir}"
+ sourceroots="${test.base.dir}/classpath-src/classesDir">
+ <classpath>
+ <pathelement path="${aspectjrt.jar}"/>
+ </classpath>
+ </iajc>
+ </target>
+
+</project>
--- /dev/null
+
+
+This contains artifacts for two harness test cases,
+for classpath (jar and dir) and aspectpath.
+
+Binaries are in jars/*, and classesDir/*, and
+binary sources and a build script are in classpath-src.
+
+Two test specifications are in tests/ajcHarnessTests.xml:
+
+ <ajc-test dir="harness/classpathTest"
+ title="specify jars and directories on classpath"
+ keywords="purejava">
+ <compile classpath="classesDir,jars/required.jar"
+ files="Main.java"/>
+ <run class="Main"/>
+ </ajc-test>
+
+ <ajc-test dir="harness/classpathTest"
+ title="specify aspectpath and classpath jars and directories">
+ <compile classpath="classesDir,jars/required.jar"
+ aspectpath="jars/requiredAspects.jar"
+ files="AspectMain.java"/>
+ <run class="AspectMain"/>
+ </ajc-test>