@@ -815,33 +815,17 @@ public class BuildArgParser extends Main { | |||
} else if (arg.equals("-timers")) { | |||
buildConfig.setTiming(true); | |||
// swallow - it is dealt with in Main.runMain() | |||
} else if (arg.equals("-1.5")) { | |||
buildConfig.setBehaveInJava5Way(true); | |||
unparsedArgs.add("-1.5"); | |||
// this would enable the '-source 1.5' to do the same as '-1.5' but doesnt sound quite right as | |||
// as an option right now as it doesnt mean we support 1.5 source code - people will get confused... | |||
} else if (arg.equals("-1.6")) { | |||
buildConfig.setBehaveInJava5Way(true); | |||
unparsedArgs.add("-1.6"); | |||
} else if (arg.equals("-1.7")) { | |||
buildConfig.setBehaveInJava5Way(true); | |||
unparsedArgs.add("-1.7"); | |||
} else if (arg.equals("-1.8")) { | |||
buildConfig.setBehaveInJava5Way(true); | |||
unparsedArgs.add("-1.8"); | |||
} else if (arg.equals("-1.9")) { | |||
buildConfig.setBehaveInJava5Way(true); | |||
unparsedArgs.add("-1.9"); | |||
} else if (arg.equals("-10")) { | |||
buildConfig.setBehaveInJava5Way(true); | |||
unparsedArgs.add("-10"); | |||
} else if (arg.equals("-1.3")) { | |||
buildConfig.setBehaveInJava5Way(false); | |||
unparsedArgs.add("-1.3"); | |||
} else if (arg.equals("-1.4")) { | |||
buildConfig.setBehaveInJava5Way(false); | |||
unparsedArgs.add("-1.4"); | |||
} else if (arg.equals("-source")) { | |||
if (args.size() > nextArgIndex) { | |||
String level = args.get(nextArgIndex).getValue(); | |||
if (level.equals("1.5") || level.equals("5") || level.equals("1.6") || level.equals("6") || level.equals("1.7") | |||
|| level.equals("7") || level.equals("8") || level.equals("1.8") | |||
|| level.equals("9") || level.equals("1.9") || level.equals("10")) { | |||
buildConfig.setBehaveInJava5Way(true); | |||
if (level.equals("1.3") || level.equals("1.4")) { | |||
buildConfig.setBehaveInJava5Way(false); | |||
} | |||
unparsedArgs.add("-source"); | |||
unparsedArgs.add(level); |
@@ -73,7 +73,7 @@ public class AjCompilerOptions extends CompilerOptions { | |||
public String xOptionalJoinpoints = null; | |||
// If true - autoboxing behaves differently ... | |||
public boolean behaveInJava5Way = false; | |||
public boolean behaveInJava5Way = true; | |||
public boolean timing = false; | |||
@@ -117,6 +117,7 @@ public class AjCompilerOptions extends CompilerOptions { | |||
set(settings); | |||
} | |||
@Override | |||
public Map<String,String> getMap() { | |||
Map<String,String> map = super.getMap(); | |||
// now add AspectJ additional options | |||
@@ -148,6 +149,7 @@ public class AjCompilerOptions extends CompilerOptions { | |||
return map; | |||
} | |||
@Override | |||
public void set(Map<String,String> optionsMap) { | |||
super.set(optionsMap); | |||
Object optionValue; | |||
@@ -282,6 +284,7 @@ public class AjCompilerOptions extends CompilerOptions { | |||
super.warningThreshold.set(CompilerOptions.SwallowedExceptionInCatchBlock); | |||
} | |||
@Override | |||
public String toString() { | |||
StringBuffer buf = new StringBuffer(super.toString()); | |||
// now add AspectJ additional options |
@@ -227,17 +227,17 @@ public class DeclareParents extends AjcTestCase { | |||
CompilationResult result = null; | |||
// Execute: "ajc <classes> <aspects> -showWeaveInfo" | |||
String[] sourceCompileCommandLine = new String[classes.length + aspects.length + 1]; | |||
String[] sourceCompileCommandLine = new String[classes.length + aspects.length + 2]; | |||
System.arraycopy(classes, 0, sourceCompileCommandLine, 0, classes.length); | |||
System.arraycopy(aspects, 0, sourceCompileCommandLine, classes.length, aspects.length); | |||
String[] extraOption = new String[] { "-showWeaveInfo" }; | |||
System.arraycopy(extraOption, 0, sourceCompileCommandLine, classes.length + aspects.length, 1); | |||
String[] extraOption = new String[] { "-showWeaveInfo", "-1.4"}; | |||
System.arraycopy(extraOption, 0, sourceCompileCommandLine, classes.length + aspects.length, 2); | |||
result = ajc(testBase, sourceCompileCommandLine); | |||
if (!expectErrors) | |||
assertTrue("errors? \n" + result.getErrorMessages(), !result.hasErrorMessages()); | |||
List sourceWeaveMessages = getWeaveMessages(result); | |||
List<IMessage> sourceWeaveMessages = getWeaveMessages(result); | |||
int sourceWeaveMessagesCount = sourceWeaveMessages.size(); | |||
List sourceErrorMessages = result.getErrorMessages(); | |||
List<IMessage> sourceErrorMessages = result.getErrorMessages(); | |||
int sourceErrorMessagesCount = sourceErrorMessages.size(); | |||
if (verbose) { | |||
@@ -258,15 +258,15 @@ public class DeclareParents extends AjcTestCase { | |||
assertTrue("Should get no errors for this compile, but got: " + result.getErrorMessages().size(), result.getErrorMessages() | |||
.size() == 0); | |||
// Execute: "ajc -inpath classes -showWeaveInfo -d classes2 -aspectpath aspects.jar" | |||
result = ajc(testBase, new String[] { "-inpath", "classes", "-showWeaveInfo", "-d", "classes2", "-aspectpath", | |||
result = ajc(testBase, new String[] { "-inpath", "classes", "-showWeaveInfo", "-1.4", "-d", "classes2", "-aspectpath", | |||
"aspects.jar" }); | |||
if (!expectErrors) | |||
assertTrue("unexpected errors? \n" + result.getErrorMessages(), !result.hasErrorMessages()); | |||
List binaryWeaveMessages = getWeaveMessages(result); | |||
List<IMessage> binaryWeaveMessages = getWeaveMessages(result); | |||
int binaryWeaveMessagesCount = binaryWeaveMessages.size(); | |||
List binaryErrorMessages = result.getErrorMessages(); | |||
List<IMessage> binaryErrorMessages = result.getErrorMessages(); | |||
int binaryErrorMessagesCount = binaryErrorMessages.size(); | |||
if (verbose) { | |||
@@ -281,11 +281,11 @@ public class DeclareParents extends AjcTestCase { | |||
// /////////////////////////////////////////////////////////////////////////// | |||
// Check the error messages are comparable (allow for differing orderings) | |||
if (compareErrors) { | |||
for (Iterator iter = binaryErrorMessages.iterator(); iter.hasNext();) { | |||
IMessage binaryMessage = (IMessage) iter.next(); | |||
for (Iterator<IMessage> iter = binaryErrorMessages.iterator(); iter.hasNext();) { | |||
IMessage binaryMessage = iter.next(); | |||
IMessage correctSourceMessage = null; | |||
for (Iterator iterator = sourceErrorMessages.iterator(); iterator.hasNext() && correctSourceMessage == null;) { | |||
IMessage sourceMessage = (IMessage) iterator.next(); | |||
for (Iterator<IMessage> iterator = sourceErrorMessages.iterator(); iterator.hasNext() && correctSourceMessage == null;) { | |||
IMessage sourceMessage = iterator.next(); | |||
if (sourceMessage.getMessage().equals(binaryMessage.getMessage())) { | |||
correctSourceMessage = sourceMessage; | |||
@@ -298,8 +298,8 @@ public class DeclareParents extends AjcTestCase { | |||
sourceErrorMessages.remove(correctSourceMessage); | |||
} | |||
if (sourceErrorMessages.size() > 0) { | |||
for (Iterator iter = sourceErrorMessages.iterator(); iter.hasNext();) { | |||
IMessage srcMsg = (IMessage) iter.next(); | |||
for (Iterator<IMessage> iter = sourceErrorMessages.iterator(); iter.hasNext();) { | |||
IMessage srcMsg = iter.next(); | |||
System.err.println("This error message from source compilation '" + srcMsg | |||
+ "' didn't occur during binary weaving."); | |||
} | |||
@@ -316,8 +316,8 @@ public class DeclareParents extends AjcTestCase { | |||
// Check weaving messages are comparable | |||
for (int i = 0; i < sourceWeaveMessages.size(); i++) { | |||
IMessage m1 = (IMessage) sourceWeaveMessages.get(i); | |||
IMessage m2 = (IMessage) binaryWeaveMessages.get(i); | |||
IMessage m1 = sourceWeaveMessages.get(i); | |||
IMessage m2 = binaryWeaveMessages.get(i); | |||
String s1 = m1.getDetails(); | |||
String s2 = m2.getDetails(); | |||
@@ -355,17 +355,18 @@ public class DeclareParents extends AjcTestCase { | |||
return ret; | |||
} | |||
private List getWeaveMessages(CompilationResult result) { | |||
List infoMessages = result.getInfoMessages(); | |||
List weaveMessages = new ArrayList(); | |||
for (Iterator iter = infoMessages.iterator(); iter.hasNext();) { | |||
IMessage element = (IMessage) iter.next(); | |||
private List<IMessage> getWeaveMessages(CompilationResult result) { | |||
List<IMessage> infoMessages = result.getInfoMessages(); | |||
List<IMessage> weaveMessages = new ArrayList<>(); | |||
for (IMessage element: infoMessages) {//Iterator iter = infoMessages.iterator(); iter.hasNext();) { | |||
// IMessage element = (IMessage) iter.next(); | |||
if (element.getKind() == IMessage.WEAVEINFO) | |||
weaveMessages.add(element); | |||
} | |||
return weaveMessages; | |||
} | |||
@Override | |||
protected void setUp() throws Exception { | |||
super.setUp(); | |||
baseDir = new File("../org.aspectj.ajdt.core/testdata", PROJECT_DIR); |
@@ -14,16 +14,15 @@ import java.io.File; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import org.aspectj.bridge.IMessage; | |||
import org.aspectj.tools.ajc.AjcTestCase; | |||
import org.aspectj.tools.ajc.CompilationResult; | |||
import org.aspectj.util.LangUtil; | |||
public class JavadocTest extends AjcTestCase { | |||
public static final String PROJECT_DIR = "javadoc"; | |||
private File baseDir; | |||
@Override | |||
protected void setUp() throws Exception { | |||
super.setUp(); | |||
baseDir = new File("../org.aspectj.ajdt.core/testdata", PROJECT_DIR); | |||
@@ -36,7 +35,7 @@ public class JavadocTest extends AjcTestCase { | |||
* | |||
*/ | |||
public void testMissingJavadoc() { | |||
String[] args = new String[] { "World.java", "-warn:allJavadoc" }; | |||
String[] args = new String[] { "World.java", "-warn:allJavadoc", "-1.4" }; | |||
List<Message> warningMessages = new ArrayList<Message>(); | |||
// These warnings are against public textX() methods declared in the World.java |
@@ -39,7 +39,7 @@ public class PerformanceTestCase extends CommandTestCase { | |||
// into an error so that we can use checkCompiles() ability to check errors occur. | |||
// Pass -proceedOnError to ensure even though we get that message, we still get the class file on disk | |||
String sandboxName = getSandboxName(); | |||
checkCompile("src1/LazyTjp.aj", new String[] {"-Xlint:error","-proceedOnError"}, new int[] {96}, sandboxName); | |||
checkCompile("src1/LazyTjp.aj", new String[] {"-Xlint:error","-proceedOnError", "-1.4"}, new int[] {96}, sandboxName); | |||
runMain("LazyTjp"); | |||
} | |||
@@ -16,9 +16,6 @@ import java.io.File; | |||
import java.io.IOException; | |||
import java.io.PrintWriter; | |||
import junit.framework.AssertionFailedError; | |||
import junit.framework.TestCase; | |||
import org.aspectj.ajdt.StreamPrintWriter; | |||
import org.aspectj.ajdt.ajc.AjdtAjcTests; | |||
import org.aspectj.ajdt.ajc.BuildArgParser; | |||
@@ -27,6 +24,9 @@ import org.aspectj.bridge.MessageHandler; | |||
import org.aspectj.bridge.MessageWriter; | |||
import org.aspectj.tools.ajc.Ajc; | |||
import junit.framework.AssertionFailedError; | |||
import junit.framework.TestCase; | |||
public class AjBuildManagerTest extends TestCase { | |||
private final StreamPrintWriter outputWriter = new StreamPrintWriter(new PrintWriter(System.out)); | |||
@@ -62,7 +62,7 @@ public class AjBuildManagerTest extends TestCase { | |||
String javaClassPath = System.getProperty("java.class.path"); | |||
System.out.println(javaClassPath); | |||
String sandboxName = Ajc.createEmptySandbox().getAbsolutePath(); | |||
AjBuildConfig buildConfig = parser.genBuildConfig(new String[] { "-d", sandboxName, "-classpath", javaClassPath, | |||
AjBuildConfig buildConfig = parser.genBuildConfig(new String[] { "-d", sandboxName, "-1.4", "-classpath", javaClassPath, | |||
AjdtAjcTests.TESTDATA_PATH + "/src1/A.java", | |||
// EajcModuleTests.TESTDATA_PATH + "/src1/Hello.java", | |||
}); |
@@ -30,6 +30,7 @@ public class OutjarTest extends AjcTestCase { | |||
* Make copies of JARs used for -injars/-inpath and -aspectpath because so | |||
* they are not overwritten when a test fails. | |||
*/ | |||
@Override | |||
protected void setUp() throws Exception { | |||
super.setUp(); | |||
baseDir = new File("../org.aspectj.ajdt.core/testdata",PROJECT_DIR); | |||
@@ -109,7 +110,7 @@ public class OutjarTest extends AjcTestCase { | |||
* Expected result = Compile fails with error message. | |||
*/ | |||
public void testOutjarDeletedOnError () { | |||
String[] args = new String[] {"-aspectpath", aspectjarName, "-injars", injarName, "-outjar", outjarName}; | |||
String[] args = new String[] {"-aspectpath", aspectjarName, "-injars", injarName, "-outjar", outjarName,"-1.4"}; | |||
Message error = new Message(WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE_INTERFACES,"jar1.Parent")); | |||
MessageSpec spec = new MessageSpec(null,newMessageList(error)); | |||
CompilationResult result = ajc(baseDir,args); |
@@ -114,7 +114,7 @@ public class CompilationResult { | |||
* though. | |||
* @see org.aspectj.tools.ajc.AjcTestCase | |||
*/ | |||
public List /*IMessage*/ getInfoMessages() { return infoMessages; } | |||
public List<IMessage> getInfoMessages() { return infoMessages; } | |||
/** | |||
* The error messages produced by the compiler. The list | |||
* entries are the <code>IMessage</code> objects created during the | |||
@@ -152,6 +152,7 @@ public class CompilationResult { | |||
* Returns string containing message count summary, list of messages | |||
* by type, and the actual ajc compilation command that was issued. | |||
*/ | |||
@Override | |||
public String toString() { | |||
StringBuffer buff = new StringBuffer(); | |||
buff.append("AspectJ Compilation Result:\n"); |
@@ -14,7 +14,8 @@ package org.aspectj.testing.drivers; | |||
import org.aspectj.ajdt.internal.core.builder.AjState; | |||
import junit.framework.*; | |||
import junit.framework.TestCase; | |||
import junit.framework.TestSuite; | |||
/* | |||
* Run harness tests as JUnit test suites. | |||
@@ -45,17 +46,13 @@ public class AjcHarnessTestsUsingJUnit extends TestCase { | |||
super(name); | |||
} | |||
/* (non-Javadoc) | |||
* @see junit.framework.TestCase#setUp() | |||
*/ | |||
@Override | |||
protected void setUp() throws Exception { | |||
super.setUp(); | |||
AjState.FORCE_INCREMENTAL_DURING_TESTING = true; | |||
} | |||
/* (non-Javadoc) | |||
* @see junit.framework.TestCase#tearDown() | |||
*/ | |||
@Override | |||
protected void tearDown() throws Exception { | |||
super.tearDown(); | |||
AjState.FORCE_INCREMENTAL_DURING_TESTING = false; |
@@ -180,10 +180,10 @@ | |||
keywords="purejava"> | |||
<compile classpath="classesDir,jars/required.jar" | |||
files="Main.java" | |||
outjar="main.zip"/> | |||
outjar="main.zip" options="-1.4"/> | |||
<compile classpath="classesDir,jars/required.jar" | |||
aspectpath="jars/requiredAspects.jar,jars/AspectMain.jar" | |||
files="main.zip"/> | |||
files="main.zip" options="-1.4"/> | |||
<run class="Main"/> | |||
</ajc-test> | |||
@@ -608,15 +608,15 @@ | |||
<ajc-test dir="harness/aspectpath" | |||
title="pass ltw-jarAspectpath"> | |||
<compile files="A.java" outjar="out.jar"/> | |||
<compile files="Main.java"/> | |||
<compile files="A.java" outjar="out.jar" options="-1.4"/> | |||
<compile files="Main.java" options="-1.4"/> | |||
<run class="Main" aspectpath="out.jar"/> | |||
</ajc-test> | |||
<ajc-test dir="harness/aspectpath" | |||
title="pass ltw-jarAspectpath-jarClasspath"> | |||
<compile files="A.java" outjar="out.jar"/> | |||
<compile files="Main.java" outjar="cl.zip"/> | |||
<compile files="A.java" outjar="out.jar" options="-1.4"/> | |||
<compile files="Main.java" outjar="cl.zip" options="-1.4"/> | |||
<run class="Main" aspectpath="out.jar" classpath="cl.zip"/> | |||
</ajc-test> | |||
@@ -0,0 +1,13 @@ | |||
import java.lang.annotation.*; | |||
@Retention(RetentionPolicy.RUNTIME) | |||
@interface B {} | |||
public class A { | |||
@B | |||
public void foo() {} | |||
} | |||
aspect X { | |||
before(): execution(@B * foo(..)) {} | |||
} |
@@ -204,7 +204,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs" pr="28702" title="percflow code hangs compiler"> | |||
<compile files="CloseConnectionsCflow.java"> | |||
<compile files="CloseConnectionsCflow.java" options="-1.4"> | |||
</compile> | |||
</ajc-test> | |||
@@ -535,7 +535,7 @@ | |||
<ajc-test dir="new" pr="36778" | |||
title="can't put around advice on interface static initializer" | |||
comment="this tests for a nice message given a compiler limitation"> | |||
<compile files="EmptyInterfaceCE.java"> | |||
<compile files="EmptyInterfaceCE.java" options="-1.4"> | |||
<message kind="error" line="20"/> | |||
<message kind="error" line="23"/> | |||
</compile> | |||
@@ -543,7 +543,7 @@ | |||
<ajc-test dir="bugs" pr="36803" | |||
title="cflow concretization causing assertion failure"> | |||
<compile files="CflowConcrete.java"/> | |||
<compile files="CflowConcrete.java" options="-1.4"/> | |||
<run class="CflowConcrete"/> | |||
</ajc-test> | |||
@@ -810,7 +810,7 @@ | |||
<ajc-test dir="bugs" pr="42652" | |||
title="perthis and signature bad interaction"> | |||
<compile files="InterPerCall.java"/> | |||
<compile files="InterPerCall.java" options="-1.4"/> | |||
<run class="InterPerCall"/> | |||
</ajc-test> | |||
@@ -75,7 +75,7 @@ | |||
<ajc-test dir="bugs/faultingInSource" pr="46671" | |||
title="Ensure we don't look for source on the classpath when binary not found"> | |||
<compile files="SimpleTracing.java" classpath="." options="-verbose"> | |||
<compile files="SimpleTracing.java" classpath="." options="-verbose -1.4"> | |||
<message kind="warning" line="4" text="no match for this type name: SampleClass"/> | |||
</compile> | |||
</ajc-test> | |||
@@ -244,31 +244,31 @@ | |||
<ajc-test dir="new" pr="42668" | |||
title="after returning with parameter: matching rules"> | |||
<compile files="AfterReturningParamMatching.java" /> | |||
<compile files="AfterReturningParamMatching.java" options="-1.4"/> | |||
<run class="AfterReturningParamMatching"/> | |||
</ajc-test> | |||
<ajc-test dir="bugs/binaryCompat" pr="50641" | |||
title="binary compatibility of advice method names - expect no error"> | |||
<compile files="Main.java,TraceV1.aj"/> | |||
<compile files="Main.java,TraceV1.aj" options="-1.4"/> | |||
<run class="Main"/> | |||
<compile files="TraceV2.aj"/> | |||
<compile files="TraceV2.aj" options="-1.4"/> | |||
<run class="Main"/> | |||
</ajc-test> | |||
<ajc-test dir="bugs/binaryCompat" pr="50641" | |||
title="binary compatibility of advice method names - expect error"> | |||
<compile files="Main.java,TraceV1.aj"/> | |||
<compile files="Main.java,TraceV1.aj" options="-1.4"/> | |||
<run class="Main"/> | |||
<compile files="TraceRE.aj"/> | |||
<compile files="TraceRE.aj" options="-1.4"/> | |||
<run class="Main"/> | |||
</ajc-test> | |||
<ajc-test dir="bugs/binaryCompat" pr="50641" | |||
title="binary compatibility of advice method names - expect no error"> | |||
<compile files="Main.java,TraceWithInnerV1.aj"/> | |||
<compile files="Main.java,TraceWithInnerV1.aj" options="-1.4"/> | |||
<run class="Main"/> | |||
<compile files="TraceWithInnerV2.aj"/> | |||
<compile files="TraceWithInnerV2.aj" options="-1.4"/> | |||
<run class="Main"/> | |||
</ajc-test> | |||
@@ -383,7 +383,7 @@ | |||
<ajc-test dir="bugs" pr="44272" | |||
title="retitle warning to circular {advice} dependency at ..."> | |||
<compile files="CircularAdvicePrecedence.java"> | |||
<compile files="CircularAdvicePrecedence.java" options="-1.4"> | |||
<message kind="error" line="4"/> | |||
<message kind="error" line="5"/> | |||
<message kind="error" line="6"/> | |||
@@ -459,7 +459,7 @@ | |||
<ajc-test dir="bugs" | |||
pr="60936" title="error message for constructor-execution pcd"> | |||
<compile files="InterfaceConstructor.java"> | |||
<compile files="InterfaceConstructor.java" options="-1.4"> | |||
<message kind="warning" line="10" text="no interface constructor-execution join point"/> | |||
</compile> | |||
</ajc-test> |
@@ -74,13 +74,13 @@ | |||
<ajc-test dir="new" | |||
title="if(false) optimisation" pr="48990"> | |||
<compile files="IfFalse.aj"/> | |||
<compile files="IfFalse.aj" options="-1.4"/> | |||
<run class="IfFalse"/> | |||
</ajc-test> | |||
<ajc-test dir="new" | |||
title="if(true) optimisation" pr="48990"> | |||
<compile files="IfTrue.aj"/> | |||
<compile files="IfTrue.aj" options="-1.4"/> | |||
<run class="IfTrue"/> | |||
</ajc-test> | |||
@@ -464,7 +464,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="cflow" pr="76030" title="Optimization of cflow - shared counters (2)"> | |||
<compile files="CounterTest02.java"/> | |||
<compile files="CounterTest02.java" options="-1.4"/> | |||
<run class="CounterTest02"/> | |||
</ajc-test> | |||
@@ -474,7 +474,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="cflow" pr="76030" title="Optimization of cflow - counters (4)"> | |||
<compile files="CounterTest04.java"/> | |||
<compile files="CounterTest04.java" options="-1.4"/> | |||
<run class="CounterTest04"/> | |||
</ajc-test> | |||
@@ -214,7 +214,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs150/pr120521" pr="120521" title="named pointcut not resolved in pertarget pointcut"> | |||
<compile files="PerTargetSubaspectError.java"/> | |||
<compile files="PerTargetSubaspectError.java" options="-1.4"/> | |||
</ajc-test> | |||
<ajc-test dir="bugs150/pr119210" pr="119210" title="autoboxing around advice - 1"> | |||
@@ -236,7 +236,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs150/pr119210" pr="119210" title="autoboxing around advice - 3"> | |||
<compile files="TestLib2.java,ThreadAspectLib2.java"> | |||
<compile files="TestLib2.java,ThreadAspectLib2.java" options="-1.4"> | |||
<message kind="error" line="16" text="incompatible return type applying to method-call(java.lang.Integer TestLib2.getFive())"/> | |||
<message kind="error" line="4" text="incompatible return type applying to method-call(java.lang.Integer TestLib2.getFive())"/> | |||
</compile> | |||
@@ -315,7 +315,7 @@ | |||
<ajc-test dir="bugs150/pr120474" pr="120474" title="Dollar classes"> | |||
<compile files="$ProxyPr120474.java"/> | |||
<compile files="X.aj" options="-outxml"/> | |||
<compile files="X.aj" options="-outxml -1.4"/> | |||
<run class="$ProxyPr120474" ltw="aop.xml"> | |||
<stdout> | |||
</stdout> | |||
@@ -445,7 +445,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs150" pr="103157" title="returning(Object) binding"> | |||
<compile files="Pr103157.aj"/> | |||
<compile files="Pr103157.aj" options="-1.4"/> | |||
<run class="Pr103157"> | |||
<stdout> | |||
<line text="returning from staticinit"/> | |||
@@ -473,8 +473,8 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs150/pr114436" title="ClassFormatError binary weaving perthis"> | |||
<compile files="SimpleTrace.aj,ConcreteSimpleTracing.aj" outjar="aspects.jar"/> | |||
<compile files="TestClass.java" aspectpath="aspects.jar"/> | |||
<compile files="SimpleTrace.aj,ConcreteSimpleTracing.aj" outjar="aspects.jar" options="-1.4"/> | |||
<compile files="TestClass.java" aspectpath="aspects.jar" options="-1.4"/> | |||
<run class="TestClass"/> | |||
</ajc-test> | |||
@@ -1038,7 +1038,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs" pr="61568" title="Various kinds of ambiguous bindings"> | |||
<compile files="AmbiguousBindings.aj"> | |||
<compile files="AmbiguousBindings.aj" options="-1.4"> | |||
<message line="17" text="ambiguous binding of parameter(s) foo across '||' in pointcut"></message> | |||
<message line="19" text="ambiguous binding of parameter(s) foo across '||' in pointcut"></message> | |||
<message line="21" text="ambiguous binding of parameter(s) foo across '||' in pointcut"></message> | |||
@@ -1355,7 +1355,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs150/pr106554" pr="106554" title="Problem in staticinitialization with pertypewithin aspect"> | |||
<compile files="A.aj" options="-showWeaveInfo"> | |||
<compile files="A.aj" options="-showWeaveInfo -1.4"> | |||
<message kind="weave" text="Join point 'staticinitialization(void A.<clinit>())' in Type 'A' (A.aj:1) advised by before advice from 'StopsInit' (A.aj:21)"/> | |||
</compile> | |||
<run class="A"> | |||
@@ -2546,7 +2546,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="java5/pertypewithin" title="ptw binary"> | |||
<weave classesFiles="G.java" aspectsFiles="H.java"/> | |||
<weave classesFiles="G.java" aspectsFiles="H.java" options="-1.4"/> | |||
<run class="G"> | |||
<stderr> | |||
<line text="advice running"/> | |||
@@ -2555,7 +2555,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="java5/pertypewithin" title="ptw binary aspect"> | |||
<compile files="H.java" outjar="aspects.jar"> | |||
<compile files="H.java" outjar="aspects.jar" options="-1.4"> | |||
<message kind="warning" line="1" text="no match for this type name: G"/> | |||
</compile> | |||
<compile files="G.java" aspectpath="aspects.jar"/> | |||
@@ -6261,7 +6261,7 @@ | |||
<ajc-test dir="bugs150/pr119657" title="IllegalAccessError with around advice on interface method call not self using LTW"> | |||
<compile files="services/account/StockQuoteServiceTest.java, services/accountdata/StockAccount.java, services/stockquote/StockQuoteService.java, services/stockquote/StockQuoteServiceImpl.java, services/account/AccountReport.java"/> | |||
<compile files="accounts/recovery/RecoveryNotSelf.aj"/> | |||
<compile files="accounts/recovery/RecoveryNotSelf.aj" options="-1.4"/> | |||
<run class="services.account.StockQuoteServiceTest" ltw="aop-notself.xml"> | |||
<stdout> | |||
<line text="RecoveryNotSelf.around() call(float services.stockquote.StockQuoteService.getQuote(String))"/> | |||
@@ -6292,7 +6292,7 @@ | |||
<ajc-test dir="bugs150/pr121385" title="override protected pointcut in aop.xml concrete aspect"> | |||
<compile files="Hello.java"/> | |||
<compile files="World.aj, ConcreteWorld.aj"/> | |||
<compile files="World.aj, ConcreteWorld.aj" options="-1.4"/> | |||
<run class="Hello" ltw="aop.xml"> | |||
<stdout> | |||
<line text="around start!"/> |
@@ -439,7 +439,7 @@ | |||
<ajc-test dir="bugs152/pr144465" title="ltw with serialversionUID creation"> | |||
<compile files="BigHorribleClass.java"/> | |||
<compile files="AnAspect.java"/> | |||
<compile files="AnAspect.java" options="-1.4"/> | |||
<run class="BigHorribleClass" ltw="aop1.xml"> | |||
<stderr> | |||
<line text="weaveinfo Join point 'staticinitialization(void BigHorribleClass.<clinit>())'"/> | |||
@@ -550,9 +550,9 @@ | |||
<ajc-test dir="bugs152/pr137235" pr="137235" | |||
title="directory with .jar extension" > | |||
<compile files="directory.jar/Before.java" outjar="directory.jar/inOne.custom"/> | |||
<compile files="directory.jar/BeforeExec.aj" outjar="directory.jar/inTwo"/> | |||
<compile files="directory.jar/Rename.aj" outjar="directory.jar/weave.jar"/> | |||
<compile files="directory.jar/Before.java" outjar="directory.jar/inOne.custom" options="-1.4"/> | |||
<compile files="directory.jar/BeforeExec.aj" outjar="directory.jar/inTwo" options="-1.4"/> | |||
<compile files="directory.jar/Rename.aj" outjar="directory.jar/weave.jar" options="-1.4"/> | |||
<compile files="directory.jar/Hello.java" inpath="directory.jar/inOne.custom,directory.jar/inTwo" aspectpath="directory.jar/weave.jar" outjar="directory.jar/outJar.jar"/> | |||
<run class="Hello" classpath="$sandbox/directory.jar/outJar.jar,$sandbox/directory.jar/weave.jar"> | |||
<stdout> |
@@ -29,7 +29,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs153/pr162657" title="complex pointcut"> | |||
<compile files="TestAspect.aj"/> | |||
<compile files="TestAspect.aj" options="-1.4"/> | |||
</ajc-test> | |||
<ajc-test dir="bugs153/pr164633" title="incompatibleclasschange"> | |||
@@ -352,7 +352,7 @@ | |||
<ajc-test dir="bugs153/pr145693" title="verifyErrNoTypeCflowField"> | |||
<compile files="Event.java" outjar="cpath.jar"/> | |||
<compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/> | |||
<compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar" options="-1.4"/> | |||
<compile files="Sample.java" options="-Xlint:ignore" aspectpath="apath.jar" outjar="run.jar"> | |||
<message kind="warning" line="8" text="Unable to determine match at this join point because the type 'Event' cannot be found"/> | |||
</compile> | |||
@@ -365,14 +365,14 @@ | |||
<ajc-test dir="bugs153/pr145693" title="verifyErrInpathNoTypeCflowField"> | |||
<compile files="Event.java" outjar="cpath.jar"/> | |||
<compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/> | |||
<compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar" options="-1.4"/> | |||
<compile files="Sample.java" options="-Xlint:ignore" inpath="cpath.jar" aspectpath="apath.jar" outjar="run.jar"/> | |||
<run class="Sample" classpath="run.jar,apath.jar"/> | |||
</ajc-test> | |||
<ajc-test dir="bugs153/pr145693" title="cpathNoTypeCflowField"> | |||
<compile files="Event.java" outjar="cpath.jar"/> | |||
<compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/> | |||
<compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar" options="-1.4"/> | |||
<compile files="Sample.java" options="-Xlint:ignore" classpath="cpath.jar" aspectpath="apath.jar" outjar="run.jar"/> | |||
<run class="Sample" classpath="run.jar,apath.jar"/> | |||
</ajc-test> | |||
@@ -550,7 +550,7 @@ | |||
<compile files="HelloWorld.java"/> | |||
<compile files="MessageHandler.java"/> | |||
<!-- <compile files="Aspect.aj" options="-outxml"/> --> | |||
<compile files="Aspect.aj" options="-outxml -outjar aspects.jar"/> | |||
<compile files="Aspect.aj" options="-outxml -outjar aspects.jar -1.4"/> | |||
<ant file="ajc-ant.xml" target="Duplicate JVMTI agents" verbose="true"/> | |||
</ajc-test> | |||
@@ -695,7 +695,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs153/pr156904/inDiffPkgWithoutImport" title="ensure no invalidAbsoluteTypeName when do match - 4"> | |||
<compile files="A.aj,Outer.java"> | |||
<compile files="A.aj,Outer.java" options="-1.4"> | |||
<message kind="warning" line="5" text="no match for this type name: Outer [Xlint:invalidAbsoluteTypeName]"/> | |||
</compile> | |||
</ajc-test> | |||
@@ -740,8 +740,8 @@ | |||
files="HelloWorld.java" | |||
> | |||
</compile> | |||
<compile files="AbstractSuperAspect.aj"/> | |||
<compile files="TestAdvice.aj"/> | |||
<compile files="AbstractSuperAspect.aj" options="-1.4"/> | |||
<compile files="TestAdvice.aj" options="-1.4"/> | |||
<run class="HelloWorld" ltw="aop-advice.xml"> | |||
<stdout> | |||
<line text="? ConcreteAspectWithAdvice()"/> | |||
@@ -787,8 +787,8 @@ | |||
keywords="aop.xml"> | |||
<compile files="HelloWorld.java"/> | |||
<compile files="AbstractSuperAspect.aj"/> | |||
<compile files="TestAroundClosure.aj"/> | |||
<compile files="AbstractSuperAspect.aj" options="-1.4"/> | |||
<compile files="TestAroundClosure.aj" options="-1.4"/> | |||
<run class="HelloWorld" ltw="aop-aroundclosure.xml"> | |||
<stdout> | |||
<line text="&rt; ConcreteAspectWithAroundClosure()"/> |
@@ -12,7 +12,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="features153/jdtlikehandleprovider" title="advice handle"> | |||
<compile files="A2.aj" options="-emacssym"/> | |||
<compile files="A2.aj" options="-emacssym -1.4"/> | |||
</ajc-test> | |||
<ajc-test dir="features153/jdtlikehandleprovider" title="pointcut handle"> | |||
@@ -28,7 +28,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="features153/jdtlikehandleprovider" title="two pieces of advice with the same signature and pointcut"> | |||
<compile files="A5.aj" options="-emacssym"/> | |||
<compile files="A5.aj" options="-emacssym -1.4"/> | |||
</ajc-test> | |||
<ajc-test dir="features153/jdtlikehandleprovider" title="pointcut handle with args"> | |||
@@ -44,7 +44,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="features153/jdtlikehandleprovider" title="advice handle with args"> | |||
<compile files="A8.aj" options="-emacssym"/> | |||
<compile files="A8.aj" options="-emacssym -1.4"/> | |||
</ajc-test> | |||
<ajc-test dir="features153/jdtlikehandleprovider" title="field itd handle"> |
@@ -5,7 +5,7 @@ | |||
<ajc-test dir="features160/weavingJavaxPackage" title="weave javax classes - no"> | |||
<compile files="A.java B.java" /> | |||
<compile files="X.aj" outjar="code.jar"/> | |||
<compile files="X.aj" outjar="code.jar" options="-1.4"/> | |||
<run class="javax.foo.A" classpath="code.jar" ltw="aop1.xml"> | |||
<stderr> | |||
<line text="AspectJ Weaver Version"/> | |||
@@ -23,7 +23,7 @@ | |||
<ajc-test dir="features160/weavingJavaxPackage" title="weave javax classes - yes"> | |||
<compile files="A.java B.java" /> | |||
<compile files="X.aj" outjar="code.jar"/> | |||
<compile files="X.aj" outjar="code.jar" options="-1.4"/> | |||
<run class="javax.foo.A" classpath="code.jar" ltw="aop2.xml"> | |||
<stdout> | |||
<line text="advised"/> |
@@ -274,7 +274,7 @@ | |||
<ajc-test dir="bugs161/pr230134" title="ltw inherited cflow"> | |||
<compile files="HW.java"/> | |||
<compile files="SimpleTracing.java Tracing.java HelloWorldTracing.java" outjar="foo.jar"/> | |||
<compile files="SimpleTracing.java Tracing.java HelloWorldTracing.java" outjar="foo.jar" options="-1.4"/> | |||
<run class="hello.HW" classpath="$sandbox/foo.jar" ltw="aop.xml"> | |||
<stdout> | |||
<line text="Hello World"/> |
@@ -12,13 +12,13 @@ package org.aspectj.systemtest.ajc1611; | |||
import java.io.File; | |||
import junit.framework.Test; | |||
import org.aspectj.apache.bcel.classfile.JavaClass; | |||
import org.aspectj.apache.bcel.classfile.Method; | |||
import org.aspectj.systemtest.ajc150.GenericsTests; | |||
import org.aspectj.testing.XMLBasedAjcTestCase; | |||
import junit.framework.Test; | |||
/** | |||
* @author Andy Clement | |||
*/ |
@@ -57,19 +57,19 @@ | |||
<ajc-test dir="bugs1611/pr335682" title="pr335682"> | |||
<compile inpath="foo.jar" outjar="bar.jar"/> | |||
<compile inpath="foo.jar" options="-1.4" outjar="bar.jar"/> | |||
</ajc-test> | |||
<ajc-test dir="bugs1611/pr335682" title="pr335682 - 2"> | |||
<compile inpath="case2.jar" outjar="bar.jar"/> | |||
<compile inpath="case2.jar" options="-1.4" outjar="bar.jar"/> | |||
</ajc-test> | |||
<ajc-test dir="bugs1611/pr335682" title="pr335682 - 3"> | |||
<compile inpath="case3.jar" outjar="bar.jar"/> | |||
<compile inpath="case3.jar" options="-1.4" outjar="bar.jar"/> | |||
</ajc-test> | |||
<ajc-test dir="bugs1611/pr335682" title="pr335682 - 5"> | |||
<compile inpath="case5.jar" outjar="bar.jar"/> | |||
<compile inpath="case5.jar" options="-1.4" outjar="bar.jar"/> | |||
</ajc-test> | |||
<ajc-test dir="bugs1611/pr335783" title="pr335783"> |
@@ -117,7 +117,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs174/pr368046" title="classloader exclusion - 1"> | |||
<compile files="Azpect.java" outjar="foo.jar"/> | |||
<compile files="Azpect.java" outjar="foo.jar" options="-1.4"/> | |||
<compile files="Code.java" classpath="$sandbox/foo.jar"/> | |||
<run class="Code" classpath="$sandbox/foo.jar" ltw="aop1.xml"> | |||
<stdout> | |||
@@ -135,7 +135,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs174/pr368046" title="classloader exclusion - 2"> | |||
<compile files="Azpect.java" outjar="foo.jar"/> | |||
<compile files="Azpect.java" outjar="foo.jar" options="-1.4"/> | |||
<compile files="Code.java" classpath="$sandbox/foo.jar"/> | |||
<run class="Code" classpath="$sandbox/foo.jar" ltw="aop1.xml"> | |||
<stdout> | |||
@@ -154,7 +154,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs174/pr368046" title="classloader exclusion - 3"> | |||
<compile files="Azpect.java" outjar="foo.jar"/> | |||
<compile files="Azpect.java" outjar="foo.jar" options="-1.4"/> | |||
<compile files="Code.java" classpath="$sandbox/foo.jar"/> | |||
<run class="Code" classpath="$sandbox/foo.jar" ltw="aop1.xml"> | |||
<stdout> | |||
@@ -172,7 +172,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs174/pr368046" title="classloader exclusion - 4"> | |||
<compile files="Azpect.java" outjar="foo.jar"/> | |||
<compile files="Azpect.java" outjar="foo.jar" options="-1.4"/> | |||
<compile files="Code.java" classpath="$sandbox/foo.jar"/> | |||
<run class="Code" classpath="$sandbox/foo.jar" ltw="aop2.xml"> | |||
<stdout> | |||
@@ -191,7 +191,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs174/pr368046" title="classloader exclusion - 5"> | |||
<compile files="Azpect.java" outjar="foo.jar"/> | |||
<compile files="Azpect.java" outjar="foo.jar" options="-1.4"/> | |||
<compile files="Code.java" classpath="$sandbox/foo.jar"/> | |||
<run class="Code" classpath="$sandbox/foo.jar" ltw="aop3.xml"> | |||
<stdout> |
@@ -24,6 +24,10 @@ import junit.framework.Test; | |||
*/ | |||
public class Ajc192Tests extends XMLBasedAjcTestCase { | |||
public void test11Flags() throws Exception { | |||
runTest("11flags"); | |||
} | |||
public void testNestmates() throws Exception { | |||
runTest("nestmates"); | |||
JavaClass outer = getClassFrom(ajc.getSandboxDirectory(), "Outer"); |
@@ -2,12 +2,17 @@ | |||
<suite> | |||
<ajc-test dir="bugs192/11flags" title="11flags"> | |||
<compile files="A.java" options="-11 -showWeaveInfo"> | |||
<message kind="weave" text="Join point 'method-execution(void A.foo())' in Type 'A' (A.java:8) advised by before advice from 'X' (A.java:12)"/> | |||
</compile> | |||
</ajc-test> | |||
<ajc-test dir="bugs192/nestmates" title="nestmates"> | |||
<compile files="Outer.java" options="-11"> | |||
</compile> | |||
</ajc-test> | |||
<ajc-test dir="bugs192/nestmates" title="nestmates 2"> | |||
<compile files="Outer2.java" options="-11"> | |||
</compile> |
@@ -210,7 +210,7 @@ | |||
<ajc-test dir="base/test136" title="supers, supers, supers" | |||
keywords="from-base"> | |||
<compile files="Driver.java"/> | |||
<compile files="Driver.java" options="-1.4"/> | |||
<run class="Driver"/> | |||
</ajc-test> | |||
@@ -13,7 +13,7 @@ | |||
<ajc-test dir="design/intro" | |||
title="within and introductions behaves correctly" keywords="from-design"> | |||
<compile files="Within.java"/> | |||
<compile files="Within.java" options="-1.4"/> | |||
<run class="Within"/> | |||
</ajc-test> | |||
@@ -66,7 +66,7 @@ | |||
<ajc-test dir="design/eachobject" | |||
title="more tests of eachobject with some difficult typing issues" | |||
keywords="from-design"> | |||
<compile files="Tricky3.java"/> | |||
<compile files="Tricky3.java" options="-1.4"/> | |||
<run class="Tricky3"/> | |||
</ajc-test> | |||
@@ -374,7 +374,7 @@ | |||
pr="90806" | |||
keywords="incremental-test" | |||
title="NPE in genHandleIdentifier"> | |||
<compile staging="true" options="-incremental,-verbose,-emacssym" sourceroots="src"/> | |||
<compile staging="true" options="-incremental,-verbose,-emacssym,-1.4" sourceroots="src"/> | |||
<!--inc-compile tag="20"/--> | |||
</ajc-test> | |||
@@ -75,7 +75,7 @@ | |||
<ajc-test dir="incremental/model/sourcefiles_updating" | |||
title="Testing incremental structure model: Updating files" | |||
keywords="incremental-test,model-test" > | |||
<compile staging="true" options="-incremental,-emacssym,-Xset:minimalModel=false" sourceroots="src"/> | |||
<compile staging="true" options="-incremental,-emacssym,-Xset:minimalModel=false,-1.4" sourceroots="src"/> | |||
<!-- On first compile, 5 source files in model, 'root','Alpha','Beta','Gamma','Delta' --> | |||
<inc-compile tag="20" checkModel="java source file=5,method=4,class=3,FileMapSize=4"/> <!-- Beta changed, method added --> | |||
<inc-compile tag="30" checkModel="java source file=5,method=4,class=4,advice=1"/> <!-- Delta changed, class added --> |
@@ -127,7 +127,7 @@ | |||
<ajc-test dir="errors" pr="244" | |||
title="decent errors for around return type not matching target point" | |||
keywords="from-errors"> | |||
<compile files="AroundReturnType.java"> | |||
<compile files="AroundReturnType.java" options="-1.4"> | |||
<message kind="error" line="2"/> | |||
<message kind="error" line="6"/> | |||
<message kind="error" line="7"/> | |||
@@ -395,7 +395,7 @@ | |||
<ajc-test dir="errors" | |||
title="circular dominates leading to irresolvable advice precedence" | |||
keywords="from-errors"> | |||
<compile files="CircularDominates.java"> | |||
<compile files="CircularDominates.java" options="-1.4"> | |||
<message kind="error" line="12"/> | |||
<message kind="error" line="16"/> | |||
<message kind="error" line="20"/> |
@@ -57,7 +57,7 @@ | |||
pr="41181"> | |||
<compile files="ClinitTest.java, Util.java"/> | |||
<run class="ClinitTest"/> | |||
<compile files="ClinitTest.java, Util.java, TJP.aj" options="-Xlint:warning"> | |||
<compile files="ClinitTest.java, Util.java, TJP.aj" options="-Xlint:warning -1.4"> | |||
<message kind="warning" line="24" text="can not build"/> | |||
<message kind="warning" line="31" text="can not build"/> | |||
</compile> |
@@ -65,7 +65,7 @@ | |||
<compile | |||
files="HelloWorld.java" | |||
/> | |||
<compile files="Aspect.aj" options="-outxml"/> | |||
<compile files="Aspect.aj" options="-outxml -1.4"/> | |||
<ant file="ant.xml" target="Trace everything" verbose="true"> | |||
<stdout> | |||
<line text="Hello World!"/> | |||
@@ -77,7 +77,7 @@ | |||
<compile | |||
files="HelloWorld.java" | |||
/> | |||
<compile files="Aspect.aj" options="-outxml"/> | |||
<compile files="Aspect.aj" options="-outxml -1.4"/> | |||
<ant file="ant.xml" target="JDK 1.4 tracing" verbose="true"> | |||
<stdout> | |||
<line text="Hello World!"/> | |||
@@ -89,7 +89,7 @@ | |||
<compile | |||
files="HelloWorld.java" | |||
/> | |||
<compile files="Aspect.aj" options="-outxml"/> | |||
<compile files="Aspect.aj" options="-outxml -1.4"/> | |||
<ant file="ant.xml" target="Tracing file System Property" verbose="true"> | |||
<stdout> | |||
<line text="Hello World!"/> |
@@ -184,7 +184,7 @@ | |||
<ajc-test dir="harness" | |||
title="valid XLintWarningTest file, default level of warning"> | |||
<compile files="XLintWarningTest.java"> | |||
<compile files="XLintWarningTest.java" options="-1.4"> | |||
<message kind="warning" line="5" | |||
text="Xlint:invalidAbsoluteTypeName"/> | |||
</compile> |