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"); }
<!-- 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"/>
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");