import org.aspectj.bridge.Message;
import org.aspectj.bridge.MessageUtil;
import org.aspectj.bridge.Version;
+import org.aspectj.weaver.ResolvedTypeX;
import org.aspectj.weaver.World;
import org.aspectj.weaver.bcel.BcelWeaver;
import org.aspectj.weaver.bcel.BcelWorld;
File inJar = (File)i.next();
bcelWeaver.addJarFile(inJar, buildConfig.getOutputDir());
}
+
+ //check for org.aspectj.runtime.JoinPoint
+ bcelWorld.resolve("org.aspectj.lang.JoinPoint");
+
+// if () {
+// bcelWorld.showMessage(IMessage.ERROR,
+// "can't find type org.aspectj.lang.JoinPoint on classpath", null, null);
+// }
}
public World getWorld() {
import java.util.ArrayList;
import java.util.List;
+import org.aspectj.ajdt.ajc.AjdtCommand;
+import org.aspectj.bridge.ICommand;
+import org.aspectj.bridge.MessageHandler;
+
/**
* @author hugunin
*
runCompiler(args, new int[] {2});
}
+ public void testMissingRuntimeError() {
+ List args = new ArrayList();
+
+ args.add("-d");
+ args.add("out");
+
+ args.add("-classpath");
+ args.add("../lib/junit/junit.jar;../testing-client/bin");
+ args.add("testdata/src1/Xlint.java");
+
+ ICommand command = new AjdtCommand();
+ MessageHandler myHandler = new MessageHandler();
+ myHandler.setInterceptor(org.aspectj.tools.ajc.Main.MessagePrinter.TERSE);
+ boolean result = command.runCommand((String[])args.toArray(new String[args.size()]), myHandler);
+
+ assertEquals("error for org.aspectj.lang.JoinPoint not found", 1, myHandler.getErrors().length);
+ }
}