diff options
author | aclement <aclement> | 2008-06-13 23:22:54 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-06-13 23:22:54 +0000 |
commit | c5eb3381d652ab431b5d1920ccdef322b00424ac (patch) | |
tree | 757d7783f7d09c8fd935230fb41746e57f51e42f /tests | |
parent | b35eb40ec74a32030312ee9cbbe2b40f6315dc12 (diff) | |
download | aspectj-c5eb3381d652ab431b5d1920ccdef322b00424ac.tar.gz aspectj-c5eb3381d652ab431b5d1920ccdef322b00424ac.zip |
102733: broken code support, wooo
Diffstat (limited to 'tests')
3 files changed, 40 insertions, 0 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java index 2c4acdadc..bac5760a4 100644 --- a/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java @@ -23,6 +23,8 @@ import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // AspectJ1.6.1 + public void testRunningBrokenCode_pr102733_2() { runTest("running broken code - 2"); } + public void testRunningBrokenCode_pr102733() { runTest("running broken code"); } public void testErrorOnNonabstractGenericAtAspectJAspect_pr168982() { runTest("error on non-abstract generic ataspectj aspect");} public void testIgnoringTypeLevelSuppression_pr234933() { runTest("ignoring type level suppress");} public void testDuplicateMethodSignature_pr223226_2() { runTest("duplicate method signature - 2"); } diff --git a/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml b/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml index e9f3a52a5..f8c178cbc 100644 --- a/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml +++ b/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml @@ -3,6 +3,20 @@ <!-- AspectJ v1.6.1 Tests --> <suite> + <ajc-test dir="bugs161/pr102733" title="running broken code"> + <compile files="Invoker.java C.java" options=""> + <message kind="error" line="2" text="Syntax error"/> + </compile> + <run class="Invoker"/> + </ajc-test> + + <ajc-test dir="bugs161/pr102733" title="running broken code - 2"> + <compile files="Invoker2.java C2.java" options=""> + <message kind="error" line="5"/> + </compile> + <run class="Invoker2"/> + </ajc-test> + <ajc-test dir="bugs161/pr168982" title="error on non-abstract generic ataspectj aspect"> <compile files="TracingAspect2.java" options="-1.5"> <message kind="error" line="9"/> diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index ea9d7267f..317dc6c9a 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -252,6 +252,30 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa checkWasntFullBuild(); } + public void testBrokenCodeCompilation() { + initialiseProject("pr102733_1"); + build("pr102733_1"); + checkWasFullBuild(); + checkCompileWeaveCount("pr102733_1",1,0); + assertTrue("There should be an error:\n" + +getErrorMessages("pr102733_1"),!getErrorMessages("pr102733_1").isEmpty()); + build("pr102733_1"); // incremental + checkCompileWeaveCount("pr102733_1",0,0); + checkWasntFullBuild(); + alter("pr102733_1","inc1"); // fix the error + build("pr102733_1"); + checkWasntFullBuild(); + checkCompileWeaveCount("pr102733_1",1,1); + assertTrue("There should be no errors:\n" + +getErrorMessages("pr102733_1"),getErrorMessages("pr102733_1").isEmpty()); + alter("pr102733_1","inc2"); // break it again + build("pr102733_1"); + checkWasntFullBuild(); + checkCompileWeaveCount("pr102733_1",1,0); + assertTrue("There should be an error:\n" + +getErrorMessages("pr102733_1"),!getErrorMessages("pr102733_1").isEmpty()); + } + // public void testDeclareAtType_pr149293() { // configureBuildStructureModel(true); // initialiseProject("PR149293_1"); |