summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2006-08-18 14:59:13 +0000
committeraclement <aclement>2006-08-18 14:59:13 +0000
commita562d831df36dd0ec0cbf6ff0c6526ebc8977432 (patch)
treed0ba32f7f0e595791bc17397aeb717f7bc6c545a /tests
parent135173acd2c893e5bfbb420e9cccf493ba150bfe (diff)
downloadaspectj-a562d831df36dd0ec0cbf6ff0c6526ebc8977432.tar.gz
aspectj-a562d831df36dd0ec0cbf6ff0c6526ebc8977432.zip
141556: lint message sort out and memory leak resolution
Diffstat (limited to 'tests')
-rw-r--r--tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java61
-rw-r--r--tests/src/org/aspectj/systemtest/serialVerUID/serialVerUID-tests.xml5
2 files changed, 36 insertions, 30 deletions
diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
index 345681de0..3dc02895c 100644
--- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
+++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
@@ -36,7 +36,7 @@ import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.bridge.IMessageHolder;
import org.aspectj.tools.ajc.Ajc;
-import org.aspectj.weaver.Lint.LintMessage;
+import org.aspectj.weaver.LintMessage;
/**
* The superclass knows all about talking through Ajde to the compiler.
@@ -953,6 +953,8 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
public void testPr133117() {
+// System.gc();
+// System.exit();
configureNonStandardCompileOptions("-Xlint:warning");
initialiseProject("PR133117");
build("PR133117");
@@ -1426,33 +1428,33 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
configureBuildStructureModel(false);
}
-// public void testDontLoseXlintWarnings_pr141556() {
-// configureNonStandardCompileOptions("-Xlint:warning");
-// initialiseProject("PR141556");
-// build("PR141556");
-// checkWasFullBuild();
-// String warningMessage = "can not build thisJoinPoint " +
-// "lazily for this advice since it has no suitable guard " +
-// "[Xlint:noGuardForLazyTjp]";
-// assertEquals("warning message should be '" + warningMessage + "'",
-// warningMessage,
-// ((IMessage)MyTaskListManager.getWarningMessages().get(0))
-// .getMessage());
-//
-// // add a space to the Aspect but dont do a build
-// alter("PR141556","inc1");
-// // remove the space so that the Aspect is exactly as it was
-// alter("PR141556","inc2");
-// // build the project and we should not have lost the xlint warning
-// build("PR141556");
-// checkWasntFullBuild();
-// assertTrue("there should still be a warning message ",
-// !MyTaskListManager.getWarningMessages().isEmpty());
-// assertEquals("warning message should be '" + warningMessage + "'",
-// warningMessage,
-// ((IMessage)MyTaskListManager.getWarningMessages().get(0))
-// .getMessage());
-// }
+ public void testDontLoseXlintWarnings_pr141556() {
+ configureNonStandardCompileOptions("-Xlint:warning");
+ initialiseProject("PR141556");
+ build("PR141556");
+ checkWasFullBuild();
+ String warningMessage = "can not build thisJoinPoint " +
+ "lazily for this advice since it has no suitable guard " +
+ "[Xlint:noGuardForLazyTjp]";
+ assertEquals("warning message should be '" + warningMessage + "'",
+ warningMessage,
+ ((IMessage)MyTaskListManager.getWarningMessages().get(0))
+ .getMessage());
+
+ // add a space to the Aspect but dont do a build
+ alter("PR141556","inc1");
+ // remove the space so that the Aspect is exactly as it was
+ alter("PR141556","inc2");
+ // build the project and we should not have lost the xlint warning
+ build("PR141556");
+ checkWasntFullBuild();
+ assertTrue("there should still be a warning message ",
+ !MyTaskListManager.getWarningMessages().isEmpty());
+ assertEquals("warning message should be '" + warningMessage + "'",
+ warningMessage,
+ ((IMessage)MyTaskListManager.getWarningMessages().get(0))
+ .getMessage());
+ }
public void testLintMessage_pr141564() {
configureNonStandardCompileOptions("-Xlint:warning");
@@ -1472,7 +1474,8 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
msg instanceof LintMessage);
assertTrue("expected message to be noGuardForLazyTjp xlint message but" +
" instead was " + ((LintMessage)msg).getKind().toString(),
- ((LintMessage)msg).isNoGuardForLazyTjp());
+ ((LintMessage)msg).getLintKind().equals("noGuardForLazyTjp"));
+
assertTrue("expected message to be against file in project 'PR141556' but wasn't",
msg.getSourceLocation().getSourceFile().getAbsolutePath().indexOf("PR141556") != -1);
}
diff --git a/tests/src/org/aspectj/systemtest/serialVerUID/serialVerUID-tests.xml b/tests/src/org/aspectj/systemtest/serialVerUID/serialVerUID-tests.xml
index 2700af07f..dbafe9044 100644
--- a/tests/src/org/aspectj/systemtest/serialVerUID/serialVerUID-tests.xml
+++ b/tests/src/org/aspectj/systemtest/serialVerUID/serialVerUID-tests.xml
@@ -57,7 +57,10 @@
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">
+ <message kind="warning" line="24" text="can not build"/>
+ <message kind="warning" line="31" text="can not build"/>
+ </compile>
<run class="Util" options="-read"/>
</ajc-test>