diff options
author | Andy Clement <aclement@pivotal.io> | 2019-01-30 16:55:38 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2019-01-30 16:55:38 -0800 |
commit | 2b24e7377da7c849fe7f9f4fa06a701664f9d27d (patch) | |
tree | 64c36c8fcf29633af7a5e2f7405b94cbec629ca8 /tests/src/test/java/org/aspectj/systemtest/ajc163 | |
parent | d60de8d0b3e62eb36b612a824bb9345d865c0155 (diff) | |
download | aspectj-2b24e7377da7c849fe7f9f4fa06a701664f9d27d.tar.gz aspectj-2b24e7377da7c849fe7f9f4fa06a701664f9d27d.zip |
mavenizing tests - wip
Diffstat (limited to 'tests/src/test/java/org/aspectj/systemtest/ajc163')
3 files changed, 699 insertions, 0 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc163/Ajc163Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc163/Ajc163Tests.java new file mode 100644 index 000000000..15abc8921 --- /dev/null +++ b/tests/src/test/java/org/aspectj/systemtest/ajc163/Ajc163Tests.java @@ -0,0 +1,320 @@ +/******************************************************************************* + * Copyright (c) 2008 Contributors + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Andy Clement - initial API and implementation + *******************************************************************************/ +package org.aspectj.systemtest.ajc163; + +import java.io.File; +import java.util.List; + +import junit.framework.Test; + +import org.aspectj.apache.bcel.classfile.JavaClass; +import org.aspectj.apache.bcel.classfile.LocalVariable; +import org.aspectj.apache.bcel.classfile.LocalVariableTable; +import org.aspectj.apache.bcel.classfile.Method; +import org.aspectj.asm.AsmManager; +import org.aspectj.asm.IHierarchy; +import org.aspectj.asm.IProgramElement; +import org.aspectj.testing.Utils; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + public void testGenericMethodBridging_pr251326() { + runTest("itd anonymous inner class in wrong package"); + } + + public void testOrderingRepetitive_pr259279() { + runTest("ordering repetitive method"); + } + + public void testOrderingRepetitive_pr259279_2() { + runTest("ordering repetitive method - 2"); + } + + public void testExtendingASI_pr252722() { + runTest("extending AbstractSecurityInterceptor"); + } + + public void testExtendingASI_pr252722_2() { + runTest("extending AbstractSecurityInterceptor - 2"); + } + + public void testExtendingASI_pr252722_3() { + runTest("extending AbstractSecurityInterceptor - 3"); + } + + public void testExtendingASI_pr252722_4() { + runTest("extending AbstractSecurityInterceptor - 4"); + } + + public void testGetNode_pr258653() { + runTest("getNode"); + } + + public void testAtTargetPlus_pr255856() { + runTest("attarget with plus"); + } + + public void testNonNullAtArgs_pr257833() { + runTest("param annos and at args"); + } + + public void testIncorrectArgOrdering_pr219419() { + runTest("incorrect arg ordering anno style"); + } + + public void testIncorrectArgOrdering_pr219419_2() { + runTest("incorrect arg ordering anno style - 2"); + } + + public void testIncorrectArgOrdering_pr219419_3() { + runTest("incorrect arg ordering anno style - 3"); + } + + // similar to 3 but parameters other way round + public void testIncorrectArgOrdering_pr219419_4() { + runTest("incorrect arg ordering anno style - 4"); + } + + // similar to 3 but also JoinPoint passed into advice + public void testIncorrectArgOrdering_pr219419_5() { + runTest("incorrect arg ordering anno style - 5"); + } + + public void testDecpAnnoStyle_pr257754() { + runTest("decp anno style"); + } + + public void testDecpAnnoStyle_pr257754_2() { + runTest("decp anno style - 2"); + } + + public void testPoorAtAjIfMessage_pr256458() { + runTest("poor ataj if message - 1"); + } + + public void testPoorAtAjIfMessage_pr256458_2() { + runTest("poor ataj if message - 2"); + } + + /* + * public void testInheritedAnnotations_pr128664() { runTest("inherited annotations"); } + * + * public void testInheritedAnnotations_pr128664_2() { runTest("inherited annotations - 2"); } + */ + public void testGetMethodNull_pr154427() { + runTest("getMethod returning null"); + } + + public void testItdOnAnonInner_pr171042() { + runTest("itd on anonymous inner"); + } + + public void testMixedStyles_pr213751() { + runTest("mixed styles"); + } + + public void testHandles_pr249216c24() { + runTest("handles - escaped square brackets"); + IHierarchy top = AsmManager.lastActiveStructureModel.getHierarchy(); + IProgramElement ipe = null; + ipe = findElementAtLine(top.getRoot(), 4);// public java.util.List<String> Ship.i(List<String>[][] u) + assertEquals("<{Handles.java'Handles)Ship.i)\\[\\[QList\\<QString;>;", ipe.getHandleIdentifier()); + + ipe = findElementAtLine(top.getRoot(), 7);// public java.util.List<String> Ship.i(Set<String>[][] u) + assertEquals("<{Handles.java'Handles)Ship.i)\\[\\[QSet\\<QString;>;", ipe.getHandleIdentifier()); + + // public java.util.Set<String> i(java.util.Set<String>[][] u) + ipe = findElementAtLine(top.getRoot(), 10); + assertEquals("<{Handles.java'Handles~i~\\[\\[Qjava.util.Set\\<QString;>;", ipe.getHandleIdentifier()); + + ipe = findElementAtLine(top.getRoot(), 13);// public java.util.Set<String> i(java.util.Set<String>[][] u,int i) { + assertEquals("<{Handles.java'Handles~i~\\[\\[Qjava.util.Set\\<QString;>;~I", ipe.getHandleIdentifier()); + + ipe = findElementAtLine(top.getRoot(), 16);// public java.util.Set<String> i2(java.util.Set<? extends + // Collection<String>>[][] u) { + assertEquals("<{Handles.java'Handles~i2~\\[\\[Qjava.util.Set\\<+QCollection\\<QString;>;>;", ipe.getHandleIdentifier()); + + ipe = findElementAtLine(top.getRoot(), 19);// public java.util.Set<String> i3(java.util.Set<? extends + // Collection<String[]>>[][] u) + assertEquals("<{Handles.java'Handles~i3~\\[\\[Qjava.util.Set\\<+QCollection\\<\\[QString;>;>;", ipe.getHandleIdentifier()); + + ipe = findElementAtLine(top.getRoot(), 22); + assertEquals("<{Handles.java'Handles~i4~Qjava.util.Set\\<+QCollection\\<QString;>;>;", ipe.getHandleIdentifier()); + + ipe = findElementAtLine(top.getRoot(), 25); + assertEquals("<{Handles.java'Handles~i5~Qjava.util.Set\\<*>;", ipe.getHandleIdentifier()); + + } + + public void testFQType_pr256937() { + runTest("fully qualified return type"); + IHierarchy top = AsmManager.lastActiveStructureModel.getHierarchy(); + IProgramElement itd = findElementAtLine(top.getRoot(), 10); + String type = itd.getCorrespondingType(true); + assertEquals("java.util.List<java.lang.String>", type); + + itd = findElementAtLine(top.getRoot(), 16); + type = itd.getCorrespondingType(true); + assertEquals("java.util.List<java.lang.String>", type); + } + + private IProgramElement findElementAtLine(IProgramElement whereToLook, int line) { + if (whereToLook == null) { + return null; + } + if (whereToLook.getSourceLocation() != null && whereToLook.getSourceLocation().getLine() == line) { + return whereToLook; + } + List<IProgramElement> kids = whereToLook.getChildren(); + for (IProgramElement object: kids) { + if (object.getSourceLocation() != null && object.getSourceLocation().getLine() == line) { + return object; + } + IProgramElement gotSomething = findElementAtLine(object, line); + if (gotSomething != null) { + return gotSomething; + } + } + return null; + } + + public void testParameterAnnotationsOnITDs_pr256669() { // regular itd + runTest("parameter annotations on ITDs"); + } + + public void testParameterAnnotationsOnITDs_pr256669_2() { // static itd + runTest("parameter annotations on ITDs - 2"); + } + + public void testParameterAnnotationsOnITDs_pr256669_3() { // multiple parameters + runTest("parameter annotations on ITDs - 3"); + } + + public void testParameterAnnotationsOnITDs_pr256669_4() { // itd on interface + runTest("parameter annotations on ITDs - 4"); + } + + public void testOrderingIssue_1() { + runTest("ordering issue"); + } + + public void testOrderingIssue_2() { + runTest("ordering issue - 2"); + } + + // public void testGenericPointcuts_5() { + // runTest("generic pointcuts - 5"); + // } + + public void testGenericPointcuts_1() { + runTest("generic pointcuts - 1"); + } + + public void testGenericPointcuts_2() { + runTest("generic pointcuts - 2"); + } + + public void testGenericPointcuts_3() { + runTest("generic pointcuts - 3"); + } + + public void testGenericPointcuts_4() { + runTest("generic pointcuts - 4"); + } + + public void testDontAddMethodBodiesToInterface_pr163005() { + runTest("do not add method bodies to an interface"); + } + + public void testDontAddMethodBodiesToInterface_pr163005_2() { + runTest("do not add method bodies to an interface - 2"); + } + + public void testDontAddMethodBodiesToInterface_pr163005_3() { + runTest("do not add method bodies to an interface - 3"); + } + + public void testMissingLocalVariableTableEntriesOnAroundAdvice_pr173978() throws Exception { + runTest("missing local variable table on around advice"); + JavaClass jc = Utils.getClassFrom(ajc.getSandboxDirectory().getAbsolutePath(), "Test"); + Method[] ms = jc.getMethods(); + Method m = null; + for (int i = 0; i < ms.length; i++) { + if (ms[i].getName().equals("sayHello")) { + m = ms[i]; + } + } + if (m.getLocalVariableTable() == null) { + fail("Local variable table should not be null"); + } + assertEquals(2, m.getLocalVariableTable().getLocalVariableTable().length); + // LocalVariableTable: + // Start Length Slot Name Signature + // 0 12 0 this LTest; + // 0 12 1 message Ljava/lang/String; + LocalVariable lv = m.getLocalVariableTable().getLocalVariable(0); + assertNotNull(lv); + assertEquals("this", lv.getName()); + assertEquals(0, lv.getStartPC(), 0); + assertEquals(12, lv.getLength(), 12); + assertEquals("LTest;", lv.getSignature()); + lv = m.getLocalVariableTable().getLocalVariable(1); + assertNotNull(lv); + assertEquals("message", lv.getName()); + assertEquals(0, lv.getStartPC(), 0); + assertEquals(12, lv.getLength(), 12); + assertEquals("Ljava/lang/String;", lv.getSignature()); + // print(m.getLocalVariableTable()); + } + + public void testTerminateAfterCompilation_pr249710() { + runTest("terminateAfterCompilation"); + } + + public void testItdCCE_pr250091() { + runTest("itd cce"); + } + + public void testBreakingRecovery_pr226163() { + runTest("breaking recovery"); + } + + public void testGenericMethodConversions_pr250632() { + runTest("type conversion in generic itd"); + } + + public void testGenericMethodBridging_pr250493() { + runTest("bridge methods for generic itds"); + } + + public void testGenericFieldBridging_pr252285() { + runTest("bridge methods for generic itd fields"); + } + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(Ajc163Tests.class); + } + + protected File getSpecFile() { + return getClassResource("ajc163.xml"); + } + + // --- + + private void print(LocalVariableTable localVariableTable) { + LocalVariable[] lvs = localVariableTable.getLocalVariableTable(); + for (int i = 0; i < lvs.length; i++) { + LocalVariable localVariable = lvs[i]; + System.out.println(localVariable); + } + } + +}
\ No newline at end of file diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc163/AllTestsAspectJ163.java b/tests/src/test/java/org/aspectj/systemtest/ajc163/AllTestsAspectJ163.java new file mode 100644 index 000000000..f0fbbeaf6 --- /dev/null +++ b/tests/src/test/java/org/aspectj/systemtest/ajc163/AllTestsAspectJ163.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2008 Contributors + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Andy Clement - initial API and implementation + *******************************************************************************/ +package org.aspectj.systemtest.ajc163; + +import junit.framework.Test; +import junit.framework.TestSuite; + +public class AllTestsAspectJ163 { + + public static Test suite() { + TestSuite suite = new TestSuite("AspectJ 1.6.3 tests"); + // $JUnit-BEGIN$ + suite.addTest(Ajc163Tests.suite()); + // $JUnit-END$ + return suite; + } +} diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc163/ajc163.xml b/tests/src/test/java/org/aspectj/systemtest/ajc163/ajc163.xml new file mode 100644 index 000000000..c26204aa5 --- /dev/null +++ b/tests/src/test/java/org/aspectj/systemtest/ajc163/ajc163.xml @@ -0,0 +1,354 @@ +<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]> + +<suite> + + + <ajc-test dir="bugs163/pr259279" title="ordering repetitive method"> + <compile files="SomeServiceImpl.java SomeInterface.java Main.java GenericService.java GenericServiceImpl.java Aspect.java" options="-1.5"/> + <run class="Main"/> + </ajc-test> + + <ajc-test dir="bugs163/pr259279" title="ordering repetitive method - 2"> + <compile files="GenericServiceImpl.java SomeServiceImpl.java SomeInterface.java Main.java GenericService.java Aspect.java" options="-1.5"/> + <run class="Main"/> + </ajc-test> + + <ajc-test dir="bugs163/pr258653" title="getNode"> + <compile files="staticinit.java" options="-1.5 -emacssym"/> + </ajc-test> + + <ajc-test dir="bugs163/pr252722" title="extending AbstractSecurityInterceptor"> + <compile files="A.java" options="-1.5"/> + <run class="A"/> + </ajc-test> + + <ajc-test dir="bugs163/pr252722" title="extending AbstractSecurityInterceptor - 2"> + <compile files="ACode.java" options="-1.5"/> + <run class="ACode"/> + </ajc-test> + + <ajc-test dir="bugs163/pr252722" title="extending AbstractSecurityInterceptor - 3"> + <compile files="B.java" options="-1.5"/> + <run class="B"/> + </ajc-test> + + <ajc-test dir="bugs163/pr252722" title="extending AbstractSecurityInterceptor - 4"> + <compile files="BCode.java" options="-1.5"/> + <run class="BCode"/> + </ajc-test> + + <ajc-test dir="bugs163/pr154427" title="getMethod returning null"> + <compile files="AuthorizationImpl.java Authorization.java AuthorizationAdmin.java CallAndMethodSignatureAspect.java CallTest.java" options=""/> + <run class="CallTest"> + <stdout> + <line text="public abstract boolean Authorization.mayPerform(java.lang.String,java.lang.String)"/> + <line text="public abstract boolean AuthorizationAdmin.mayPerform(java.lang.String, java.lang.String)"/> + <line text="mayPerform() executing"/> + <line text="public abstract boolean AuthorizationAdmin.mayPerform2(java.lang.String,java.lang.String)"/> + <line text="public abstract boolean AuthorizationAdmin.mayPerform2(java.lang.String, java.lang.String)"/> + <line text="mayPerform2() executing"/> + <line text="public abstract boolean Authorization.mayPerform(java.lang.String,java.lang.String)"/> + <line text="public abstract boolean Authorization.mayPerform(java.lang.String, java.lang.String)"/> + <line text="mayPerform() executing"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr128664" title="inherited annotations"> + <compile files="Bug.java" options="-1.5 -showWeaveInfo"> + <message kind="weave" text=""/> + </compile> + <run class="Bug"/> + </ajc-test> + + <ajc-test dir="bugs163/pr128664" title="inherited annotations - 2"> + <compile files="Bug2.java" options="-1.5 -showWeaveInfo"> + <message kind="weave" text=""/> + </compile> + <run class="Bug2"/> + </ajc-test> + + <ajc-test dir="bugs163/pr257754" title="decp anno style"> + <compile files="Main.java" options="-1.5"/> + <run class="example.Main"> + <stdout> + <line text="In doFoo class example.DefaultFoo"/> + <line text="Bar"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr257754" title="decp anno style - 2"> + <compile files="Main2.java Foo.java DefaultFoo.java" options="-1.5"> + <message kind="error" text="but it is of incorrect visibility"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs163/pr219419" title="incorrect arg ordering anno style"> + <compile files="Code.java" options="-1.5"/> + <run class="Code"> + <stdout> + <line text="Catching mess. Argument was ewwww"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr219419" title="incorrect arg ordering anno style - 2"> + <compile files="Code2.java" options="-1.5"/> + <run class="Code2"> + <stdout> + <line text="Catching mess. Argument was ewwww"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr219419" title="incorrect arg ordering anno style - 3"> + <compile files="Code3.java" options="-1.5"/> + <run class="Code3"> + <stdout> + <line text="afterReturningCreateBean advice input='s' ret=37"/> + <line text="Code3.main returned from call to createBean 37"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr219419" title="incorrect arg ordering anno style - 4"> + <compile files="Code4.java" options="-1.5"/> + <run class="Code4"> + <stdout> + <line text="afterReturningCreateBean advice input='s' ret=37"/> + <line text="Code4.main returned from call to createBean 37"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr219419" title="incorrect arg ordering anno style - 5"> + <compile files="Code5.java" options="-1.5"/> + <run class="Code5"> + <stdout> + <line text="afterReturningCreateBean advice input='s' ret=37"/> + <line text="Code5.main returned from call to createBean 37"/> + </stdout> + </run> + </ajc-test> + + + + <ajc-test dir="bugs163/pr256458" title="poor ataj if message - 1"> + <compile files="Code.java" options="-1.5"> + <message kind="error" text="in annotation style, if(...) pointcuts cannot contain code"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs163/pr256458" title="poor ataj if message - 2"> + <compile files="Code2.java" options="-1.5"> + <message kind="error" text="in annotation style, if(...) pointcuts cannot contain code"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs163/pr256937" title="fully qualified return type"> + <compile files="Ship.java ShipAccessor.java" options="-emacssym -1.5"/> + </ajc-test> + + <ajc-test dir="bugs163/pr213751" title="mixed styles"> + <compile files="Foo.java" options="-emacssym -1.5"/> + </ajc-test> + + <ajc-test dir="bugs163/pr249216" title="handles - escaped square brackets"> + <compile files="Handles.java" options="-emacssym -1.5"/> + </ajc-test> + + <ajc-test dir="bugs163/pr171042" title="itd on anonymous inner"> + <compile files="TestClass.java Executable.java RunnableAspect.java" options=""/> + </ajc-test> + + <ajc-test dir="bugs163/pr254207" title="ordering issue"> + <compile files="Abstract.java Concrete.java" options="-1.5 -proceedOnError -Xset:pipelineCompilation=false"> + <message kind="error" line="1" text="Bound mismatch"/> + </compile> + <compile files="Concrete.java Abstract.java" options="-1.5 -proceedOnError -Xset:pipelineCompilation=false"> + <message kind="error" line="1" text="Bound mismatch"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs163/pr254207/case2" title="ordering issue - 2"> + <compile files="Interface.java Clazz.java Abstract.java Concrete.java" options="-1.5 -proceedOnError -Xset:pipelineCompilation=false"> + <message kind="error" line="1" text="Bound mismatch"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs163/pr256669" title="parameter annotations on ITDs"> + <compile files="Destination.java SimpleTest.java Introduction.java SomeAnnotation.java" options="-1.5"/> + <run class="SimpleTest"> + <stdout> + <line text="Parameter 0 has 1 parameter annotations"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr256669" title="parameter annotations on ITDs - 2"> + <compile files="Two.java" options="-1.5"/> + <run class="Two"> + <stdout> + <line text="Parameter 0 has 1 parameter annotations"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr256669" title="parameter annotations on ITDs - 3"> + <compile files="Three.java" options="-1.5"/> + <run class="Three"> + <stdout> + <line text="Parameter 0 has 0 parameter annotations"/> + <line text="Parameter 1 has 1 parameter annotations"/> + <line text="Parameter 2 has 0 parameter annotations"/> + <line text="Parameter 3 has 1 parameter annotations"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr256669" title="parameter annotations on ITDs - 4"> + <compile files="Four.java" options="-1.5"/> + <run class="Four"> + <stdout> + <line text="Class D parameter 0 has 1 parameter annotations"/> + <line text="Interface I parameter 0 has 1 parameter annotations"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr253109" title="generic pointcuts - 1"> + <compile files="CodeOne.java" options="-1.5"> + <message kind="warning" line="4" text="has not been applied"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs163/pr257833" title="param annos and at args"> + <compile files="NotNull.java NotNullAspect.java NotNullTest.java" options="-1.5 -showWeaveInfo"> + <message kind="weave" text="Join point 'constructor-execution(void patterntesting.check.runtime.NotNullTest.<init>(java.lang.String))' in Type"/> + </compile> + <run class="patterntesting.check.runtime.NotNullTest"/> + </ajc-test> + + <ajc-test dir="bugs163/pr253109" title="generic pointcuts - 2"> + <compile files="CodeTwo.java" options="-1.5"/> + </ajc-test> + + <ajc-test dir="bugs163/pr253109" title="generic pointcuts - 3"> + <compile files="CodeThree.java" options="-1.5 -showWeaveInfo"> + <message kind="weave" text="advised by before advice from 'CodeThree' (CodeThree.java:4)"/> + <message kind="weave" text="advised by before advice from 'CodeThree' (CodeThree.java:5) [with runtime test]"/> + <message kind="warning" line="6" text="has not been applied"/> + <message kind="warning" line="7" text="has not been applied"/> + <message kind="weave" text="advised by before advice from 'CodeThree' (CodeThree.java:8)"/> + <message kind="weave" text="advised by before advice from 'CodeThree' (CodeThree.java:9) [with runtime test]"/> + <message kind="warning" line="5" text="unchecked"/> + <message kind="warning" line="9" text="unchecked"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs163/pr253109" title="generic pointcuts - 4"> + <compile files="CodeFour.java" options="-1.5"> + <message kind="warning" text="has not been applied"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs163/pr255856" title="attarget with plus"> + <compile files="Bug.java" options="-1.5"> + <message kind="error" text="unexpected pointcut element"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs163/pr253109" title="generic pointcuts - 5"> + <compile files="CodeFive.java" options="-1.5 -showWeaveInfo"> + <message kind="weave" line="55" text="advised by around advice"/> + </compile> + </ajc-test> + + + <ajc-test dir="bugs163/pr163005" title="do not add method bodies to an interface"> + <compile files="Code.java" options="-1.4"> + <message kind="warning" text="The joinpoint 'method-call(java.lang.Class java.lang.Class.forName(java.lang.String))' cannot be advised"/> + </compile> + <run class="Code"/> + </ajc-test> + + <ajc-test dir="bugs163/pr163005" title="do not add method bodies to an interface - 2"> + <compile files="Code.java" options="-1.4 -XnoInline"> + <message kind="warning" text="The joinpoint 'method-call(java.lang.Class java.lang.Class.forName(java.lang.String))' cannot be advised"/> + </compile> + <run class="Code"/> + </ajc-test> + + <ajc-test dir="bugs163/pr163005" title="do not add method bodies to an interface - 3"> + <compile files="Code2.java" options="-1.4"> + <message kind="warning" text="The joinpoint 'constructor-call(void java.lang.Object.<init>())' cannot be advised"/> + </compile> + <run class="Code2"/> + </ajc-test> + + <ajc-test dir="bugs163/pr250091" title="itd cce"> + <compile files="Demo.java" options="-1.5"/> + <run class="Demo"> + <stdout> + <line text="class A (false)"/> + <line text="class A (false)"/> + <line text="class Base (false)"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr226163" title="breaking recovery"> + <compile files="Code.java" options="-1.5"> + <message kind="error" line="4" text="Syntax error"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs163/pr173978" title="missing local variable table on around advice"> + <compile files="Test.java TestAroundAspect.java" options="-1.5"/> + </ajc-test> + + <ajc-test dir="bugs163/pr249710" title="terminateAfterCompilation"> + <compile files="Foo.java" options="-1.5"> + </compile> + </ajc-test> + + <ajc-test dir="bugs163/pr250632" title="type conversion in generic itd"> + <compile files="MyAspect.java" options="-1.5"/> + </ajc-test> + + <ajc-test dir="bugs163/pr250493" title="bridge methods for generic itds"> + <compile files="Bridged.java" options="-1.5"/> + <run class="Bridged"> + <stdout> + <line text="getterA()java.lang.Object isBridged?true"/> + <line text="getterA()java.lang.String isBridged?false"/> + <line text="getterB()java.lang.Object isBridged?true"/> + <line text="getterB()java.lang.String isBridged?false"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr252285" title="bridge methods for generic itd fields"> + <compile files="Bridged.java" options="-1.5"/> + <run class="Bridged"> + <stdout> + <line text="ajc$interFieldGet$X$Super$getterA()java.lang.Integer isBridged?false"/> + <line text="ajc$interFieldGet$X$Super$getterA()java.lang.Number isBridged?true"/> + <line text="ajc$interFieldSet$X$Super$getterA()void isBridged?false"/> + <line text="ajc$interFieldSet$X$Super$getterA()void isBridged?true"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr251326" title="itd anonymous inner class in wrong package"> + <compile files="pkgA/Listener.java pkgA/Target.java pkgB/InferListener.aj" options="-1.5"/> + <run class="pkgA.Target"> + <stdout> + <line text="Simple A"/> + <line text="Inferred B"/> + </stdout> + </run> + </ajc-test> + +</suite>
\ No newline at end of file |