aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/org
diff options
context:
space:
mode:
authoraclement <aclement>2006-05-12 15:34:39 +0000
committeraclement <aclement>2006-05-12 15:34:39 +0000
commit3fa4d24ac16e94ee40b824fe27830fe7a34866a3 (patch)
treef7b5cdb0efd4d8bb6f3fef2f3c7256be1ff0bab7 /tests/src/org
parent563a4cb323c8eb5322e4266823d6aae38dbbf56f (diff)
downloadaspectj-3fa4d24ac16e94ee40b824fe27830fe7a34866a3.tar.gz
aspectj-3fa4d24ac16e94ee40b824fe27830fe7a34866a3.zip
test and fix for 133117: dont spam the user with noGuardForLazyTjp messages.
Diffstat (limited to 'tests/src/org')
-rw-r--r--tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java22
-rw-r--r--tests/src/org/aspectj/systemtest/xlint/xlint-tests.xml14
2 files changed, 29 insertions, 7 deletions
diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
index 7d149f91f..7958f6a0d 100644
--- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
+++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
@@ -885,6 +885,28 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed {
configureBuildStructureModel(false);
}
+
+ public void testPr133117() {
+ configureNonStandardCompileOptions("-Xlint:warning");
+ initialiseProject("PR133117");
+ build("PR133117");
+ assertTrue("There should only be one xlint warning message reported:\n"
+ +MyTaskListManager.getWarningMessages(),
+ MyTaskListManager.getWarningMessages().size()==1);
+ alter("PR133117","inc1");
+ build("PR133117");
+ List warnings = MyTaskListManager.getWarningMessages();
+ List noGuardWarnings = new ArrayList();
+ for (Iterator iter = warnings.iterator(); iter.hasNext();) {
+ IMessage element = (IMessage) iter.next();
+ if (element.getMessage().indexOf("Xlint:noGuardForLazyTjp") != -1) {
+ noGuardWarnings.add(element);
+ }
+ }
+ assertTrue("There should only be two Xlint:noGuardForLazyTjp warning message reported:\n"
+ +noGuardWarnings,noGuardWarnings.size() == 2);
+ }
+
public void testPr131505() {
configureNonStandardCompileOptions("-outxml");
initialiseProject("PR131505");
diff --git a/tests/src/org/aspectj/systemtest/xlint/xlint-tests.xml b/tests/src/org/aspectj/systemtest/xlint/xlint-tests.xml
index 077c4a4bc..30ef5dea4 100644
--- a/tests/src/org/aspectj/systemtest/xlint/xlint-tests.xml
+++ b/tests/src/org/aspectj/systemtest/xlint/xlint-tests.xml
@@ -18,13 +18,13 @@
<ajc-test dir="bugs/lazyTjpXLintWarning"
title="no XLint warning: thisJoinPoint not lazy (no if PCD) but would have been stopped anyway by around advice">
<compile options="-Xlint:warning" files="Scenario3.aj">
- <message kind="warning" line="14" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard. The advice applies at method-execution(void Test.main(java.lang.String[])) [Xlint:noGuardForLazyTjp]"/>
+ <message kind="warning" line="14" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard [Xlint:noGuardForLazyTjp]"/>
</compile>
</ajc-test>
<ajc-test dir="bugs/lazyTjpXLintWarning" title="no XLint warning: thisJoinPoint cannot be built lazily">
<compile options="-Xlint:warning" files="Scenario4.aj">
- <message kind="warning" line="9" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard. The advice applies at method-execution(void Test.main(java.lang.String[]))"/>
+ <message kind="warning" line="9" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard"/>
</compile>
</ajc-test>
@@ -52,23 +52,23 @@
<ajc-test dir="bugs/lazyTjpXLintWarning"
title="lazytjp: warning when if missing on before advice">
<compile options="-Xlint:warning" files="LazyTjpTest2.java">
- <message kind="warning" line="16" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard. The advice applies at method-execution(void LazyTjpTest2.test2())"/>
+ <message kind="warning" line="16" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard"/>
</compile>
</ajc-test>
<ajc-test dir="bugs/lazyTjpXLintWarning"
title="lazytjp: warning when if missing on after advice">
<compile options="-Xlint:warning" files="LazyTjpTest3.java">
- <message kind="warning" line="17" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard. The advice applies at method-execution(void LazyTjpTest3.test2())"/>
+ <message kind="warning" line="17" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard"/>
</compile>
</ajc-test>
<ajc-test dir="bugs/lazyTjpXLintWarning"
title="lazytjp: multiple clashing advice preventing lazytjp">
<compile options="-Xlint:warning" files="LazyTjpTest4.java">
- <message kind="warning" line="13" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard. The advice applies at method-execution(void LazyTjpTest4.test1())"/>
+ <message kind="warning" line="13" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard"/>
<message kind="warning" line="3" text="can not implement lazyTjp at joinpoint method-execution(void LazyTjpTest4.test1()) because of advice conflicts, see secondary locations to find conflicting advice"/>
- <message kind="warning" line="17" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard. The advice applies at method-execution(void LazyTjpTest4.test1())"/>
+ <message kind="warning" line="17" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard"/>
</compile>
</ajc-test>
@@ -76,7 +76,7 @@
title="lazytjp: interfering before and around">
<compile options="-Xlint:warning" files="LazyTjpTest5.java">
<message kind="warning" line="3" text="can not implement lazyTjp at joinpoint method-execution(void LazyTjpTest5.test1()) because of advice conflicts, see secondary locations to find conflicting advice"/>
- <message kind="warning" line="13" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard. The advice applies at method-execution(void LazyTjpTest5.test1())"/>
+ <message kind="warning" line="13" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard"/>
</compile>
</ajc-test>