summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2004-12-09 19:02:01 +0000
committeraclement <aclement>2004-12-09 19:02:01 +0000
commitd660376351cd359c940bca53d421ea6be2a1bb62 (patch)
tree08bb98b7f3e53cb5e8cf35e3a027fc3b01a1a1f7 /tests
parent611164c967be7d02c56a014a4ef2e79f9b52f16a (diff)
downloadaspectj-d660376351cd359c940bca53d421ea6be2a1bb62.tar.gz
aspectj-d660376351cd359c940bca53d421ea6be2a1bb62.zip
Allows passing of extra argument to the compiler (-1.5 for autoboxing behavior)
Diffstat (limited to 'tests')
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/TestUtils.java22
1 files changed, 18 insertions, 4 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc150/TestUtils.java b/tests/src/org/aspectj/systemtest/ajc150/TestUtils.java
index 3462432e3..768bd4171 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/TestUtils.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/TestUtils.java
@@ -27,13 +27,27 @@ public abstract class TestUtils extends AjcTestCase {
protected CompilationResult binaryWeave(String inpath,String insource,int expErrors,int expWarnings) {
return binaryWeave(inpath,insource,expErrors,expWarnings,false);
}
-
+
protected CompilationResult binaryWeave(String inpath, String insource,int expErrors,int expWarnings,boolean xlinterror) {
+ return binaryWeave(inpath,insource,expErrors,expWarnings,false,"");
+ }
+
+ protected CompilationResult binaryWeave(String inpath, String insource,int expErrors,int expWarnings,String extraOption) {
+ return binaryWeave(inpath,insource,expErrors,expWarnings,false,extraOption);
+ }
+
+ protected CompilationResult binaryWeave(String inpath, String insource,int expErrors,int expWarnings,boolean xlinterror,String extraOption) {
String[] args = null;
if (xlinterror) {
- args = new String[] {"-inpath",inpath,insource,"-showWeaveInfo","-proceedOnError","-Xlint:warning"};
+ if (extraOption!=null && extraOption.length()>0)
+ args = new String[] {"-inpath",inpath,insource,"-showWeaveInfo","-proceedOnError","-Xlint:warning",extraOption};
+ else
+ args = new String[] {"-inpath",inpath,insource,"-showWeaveInfo","-proceedOnError","-Xlint:warning"};
} else {
- args = new String[] {"-inpath",inpath,insource,"-showWeaveInfo","-proceedOnError"};
+ if (extraOption!=null && extraOption.length()>0)
+ args = new String[] {"-inpath",inpath,insource,"-showWeaveInfo","-proceedOnError",extraOption};
+ else
+ args = new String[] {"-inpath",inpath,insource,"-showWeaveInfo","-proceedOnError"};
}
CompilationResult result = ajc(baseDir,args);
if (verbose || result.hasErrorMessages()) System.out.println(result);
@@ -54,7 +68,7 @@ public abstract class TestUtils extends AjcTestCase {
return sb.toString();
}
- private List getWeavingMessages(List msgs) {
+ protected List getWeavingMessages(List msgs) {
List result = new ArrayList();
for (Iterator iter = msgs.iterator(); iter.hasNext();) {
IMessage element = (IMessage) iter.next();