package org.aspectj.systemtest.ajc121;
import java.io.File;
+import java.util.Iterator;
+import java.util.List;
import junit.framework.Test;
+import org.aspectj.bridge.WeaveMessage;
import org.aspectj.testing.XMLBasedAjcTestCase;
public class Ajc121Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void test051_arrayCloningInJava5() {
runTest("AJC possible bug with static nested classes");
+ List l = ajc.getLastCompilationResult().getInfoMessages();
+ assertTrue("Should at least have had one weaving message",l!=null && l.size()>0);
+ boolean gotWeaveMessage = false;
+ for (Iterator msg = l.iterator(); msg.hasNext();) {
+ Object element = (Object) msg.next();
+ if (element instanceof WeaveMessage) {
+ WeaveMessage wm = (WeaveMessage)element;
+ if (wm.getMessage().indexOf("advised by around advice from")!=-1) gotWeaveMessage = true;
+ }
+ }
+ assertTrue("Expected a weaving message but only found "+l,gotWeaveMessage);
}
public void test052_bogusMessage1() {
}
public void test054_cnfe() {
- runTest("passing null to array arguments confuzes static join point signature. (1)");
+ runTest("passing null to array arguments confuzes static join point signature. (1)");
}
public void test055_cnfe() {
<ajc-test dir="bugs/java5/arrayCloning" pr="72150"
title="AJC possible bug with static nested classes">
- <compile files="A.java" inpath="OneFiveCode.jar"/>
- <!--run class="C"/-->
+ <compile files="A.java,OneFiveCode.jar" options="-showWeaveInfo"/>
+ <!-- ARGH - Cant run it because run class is of type '49' run class="C"/-->
</ajc-test>
<ajc-test dir="bugs" pr="72699"