From d07f63a30c5af1a380f5091f18c21003aebfae79 Mon Sep 17 00:00:00 2001 From: acolyer Date: Fri, 10 Feb 2006 17:59:13 +0000 Subject: [PATCH] Progress on: empty catch block warning - updates to test cases with empty catch blocks --- .../systemtest/ajc10x/ajc10x-tests.xml | 16 +++++----- .../aspectj/systemtest/ajc11/ajc11-tests.xml | 6 ++-- .../systemtest/ajc120/ajc120-tests.xml | 4 +-- .../systemtest/ajc121/ajc121-tests.xml | 2 ++ .../org/aspectj/systemtest/ajc150/ajc150.xml | 24 ++++++++------- .../ajc150/ataspectj/annotationgen.xml | 2 +- .../systemtest/ajc151/Ajc151Tests.java | 7 +++++ .../org/aspectj/systemtest/ajc151/ajc151.xml | 10 +++++++ .../aspectpath/aspectpath-tests.xml | 8 ++--- .../aspectj/systemtest/design/designtest.xml | 6 ++-- .../model/incremental-model-tests.xml | 2 +- .../tools/MultiProjectIncrementalTests.java | 29 ++++++++++--------- .../systemtest/pre10x/pre10x-tests.xml | 1 + 13 files changed, 72 insertions(+), 45 deletions(-) diff --git a/tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml b/tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml index 0c085c7f0..8076d2e25 100644 --- a/tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml +++ b/tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml @@ -175,7 +175,7 @@ - + @@ -200,7 +200,7 @@ - + @@ -617,7 +617,7 @@ - + @@ -818,7 +818,7 @@ - + @@ -852,7 +852,7 @@ - + @@ -949,7 +949,7 @@ - + @@ -1640,7 +1640,7 @@ - + @@ -1731,7 +1731,7 @@ - + diff --git a/tests/src/org/aspectj/systemtest/ajc11/ajc11-tests.xml b/tests/src/org/aspectj/systemtest/ajc11/ajc11-tests.xml index 1ca899087..61f80848c 100644 --- a/tests/src/org/aspectj/systemtest/ajc11/ajc11-tests.xml +++ b/tests/src/org/aspectj/systemtest/ajc11/ajc11-tests.xml @@ -446,7 +446,7 @@ - + @@ -499,13 +499,13 @@ - + - + diff --git a/tests/src/org/aspectj/systemtest/ajc120/ajc120-tests.xml b/tests/src/org/aspectj/systemtest/ajc120/ajc120-tests.xml index 8f2a5528e..096a7daa9 100644 --- a/tests/src/org/aspectj/systemtest/ajc120/ajc120-tests.xml +++ b/tests/src/org/aspectj/systemtest/ajc120/ajc120-tests.xml @@ -109,7 +109,7 @@ - + @@ -207,7 +207,7 @@ - + diff --git a/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml b/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml index 54f604703..681f033c7 100644 --- a/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml +++ b/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml @@ -348,6 +348,8 @@ + + diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 6a343d5f1..c29a22fbd 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -51,7 +51,9 @@ - + + + @@ -358,7 +360,7 @@ - + @@ -392,7 +394,7 @@ - + @@ -412,7 +414,7 @@ - + @@ -454,7 +456,7 @@ - + @@ -995,7 +997,7 @@ - + @@ -1055,7 +1057,7 @@ - + @@ -1586,7 +1588,7 @@ - + @@ -2480,7 +2482,7 @@ - + @@ -2494,7 +2496,7 @@ - + @@ -2509,7 +2511,7 @@ - + diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/annotationgen.xml b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/annotationgen.xml index d92762a5d..c42dbb642 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/annotationgen.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/annotationgen.xml @@ -180,7 +180,7 @@ - + diff --git a/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java b/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java index 7e209d0b5..4407a8106 100644 --- a/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java @@ -77,6 +77,13 @@ public class Ajc151Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("E extends Enum(E) again"); } + public void testSwallowedException() { + runTest("swallowed exceptions"); + } + + public void testSwallowedExceptionIgnored() { + runTest("swallowed exceptions with xlint"); + } /* * @AspectJ bugs and enhancements */ diff --git a/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml b/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml index e3b67929a..10102fc77 100644 --- a/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml +++ b/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml @@ -168,5 +168,15 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/aspectpath/aspectpath-tests.xml b/tests/src/org/aspectj/systemtest/aspectpath/aspectpath-tests.xml index bb5bd265f..5f201b355 100644 --- a/tests/src/org/aspectj/systemtest/aspectpath/aspectpath-tests.xml +++ b/tests/src/org/aspectj/systemtest/aspectpath/aspectpath-tests.xml @@ -102,7 +102,7 @@ - + @@ -117,7 +117,7 @@ - + @@ -132,7 +132,7 @@ - + @@ -147,7 +147,7 @@ - + diff --git a/tests/src/org/aspectj/systemtest/design/designtest.xml b/tests/src/org/aspectj/systemtest/design/designtest.xml index c58e2561f..9da9ac8f0 100644 --- a/tests/src/org/aspectj/systemtest/design/designtest.xml +++ b/tests/src/org/aspectj/systemtest/design/designtest.xml @@ -50,7 +50,9 @@ - + + + @@ -77,7 +79,7 @@ - + diff --git a/tests/src/org/aspectj/systemtest/incremental/model/incremental-model-tests.xml b/tests/src/org/aspectj/systemtest/incremental/model/incremental-model-tests.xml index 075b1d07f..3f00f0803 100644 --- a/tests/src/org/aspectj/systemtest/incremental/model/incremental-model-tests.xml +++ b/tests/src/org/aspectj/systemtest/incremental/model/incremental-model-tests.xml @@ -40,7 +40,7 @@ - + diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index 939902b9e..03ab2daef 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -91,13 +91,16 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { // Make simple changes to a project, adding a class and an aspect public void testAddingAnAspect() { initialiseProject("P1"); - build("P1"); + build("P1"); // build 1, weave 1 alter("P1","inc1"); // adds a class alter("P1","inc2"); // adds an aspect - build("P1"); + build("P1"); // build 1, long timeTakenForFullBuildAndWeave = getTimeTakenForBuild(); - checkWasntFullBuild(); - checkCompileWeaveCount(2,3); + checkWasFullBuild(); // it *will* be a full build under the new + // "back-to-the-source strategy + checkCompileWeaveCount(5,3); // we compile X and A (the delta) find out that + // an aspect has changed, go back to the source + // and compile X,A,C, then weave them all. build("P1"); long timeTakenForSimpleIncBuild = getTimeTakenForBuild(); // I don't think this test will have timing issues as the times should be *RADICALLY* different @@ -145,7 +148,7 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { alter("P1","inc1"); // adds a class alter("P1","inc2"); // adds an aspect build("P1"); - checkWasntFullBuild(); + checkWasFullBuild(); // adding an aspect makes us go back to the source } @@ -307,7 +310,7 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { checkForError("only abstract aspects can have type parameters"); alter("PR125405","inc2"); build("PR125405"); - checkCompileWeaveCount(1,1); + checkCompileWeaveCount(2,1); assertTrue("Should be no errors, but got "+MyTaskListManager.getErrorMessages(),MyTaskListManager.getErrorMessages().size()==0); } @@ -348,10 +351,10 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { build("pr114875"); alter("pr114875","inc1"); build("pr114875"); - checkWasntFullBuild(); + checkWasFullBuild(); alter("pr114875","inc2"); build("pr114875"); - checkWasntFullBuild(); + checkWasFullBuild(); // back to the source for an aspect change } public void testPr117882() { @@ -362,7 +365,7 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { checkWasFullBuild(); alter("PR117882","inc1"); build("PR117882"); - checkWasntFullBuild(); + checkWasFullBuild(); // back to the source for an aspect // AjdeInteractionTestbed.VERBOSE=false; // AjdeInteractionTestbed.configureBuildStructureModel(false); } @@ -375,7 +378,7 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { checkWasFullBuild(); alter("PR117882_2","inc1"); build("PR117882_2"); - checkWasntFullBuild(); + checkWasFullBuild(); // back to the source... //checkCompileWeaveCount(1,4); //fullBuild("PR117882_2"); //checkWasFullBuild(); @@ -390,7 +393,7 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { checkWasFullBuild(); alter("PR115251","inc1"); build("PR115251"); - checkWasntFullBuild(); + checkWasFullBuild(); // back to the source } @@ -502,7 +505,7 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { build("PR113257"); alter("PR113257","inc1"); build("PR113257"); - checkWasntFullBuild(); + checkWasFullBuild(); // back to the source alter("PR113257","inc1"); build("PR113257"); } @@ -512,7 +515,7 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { build("PR123612"); alter("PR123612","inc1"); build("PR123612"); - checkWasntFullBuild(); + checkWasFullBuild(); // back to the source } // other possible tests: diff --git a/tests/src/org/aspectj/systemtest/pre10x/pre10x-tests.xml b/tests/src/org/aspectj/systemtest/pre10x/pre10x-tests.xml index 4d4cb999d..0dbdce7bd 100644 --- a/tests/src/org/aspectj/systemtest/pre10x/pre10x-tests.xml +++ b/tests/src/org/aspectj/systemtest/pre10x/pre10x-tests.xml @@ -531,6 +531,7 @@ + -- 2.39.5