Browse Source

test case fix

tags/PRE_ANDY
avasseur 19 years ago
parent
commit
602bbf26fd

+ 1
- 2
tests/java5/ataspectj/ataspectj/misuse/Test005.java View File



import org.aspectj.lang.annotation.*; import org.aspectj.lang.annotation.*;


@Aspect
public class Test005 {
public abstract class Test005 {


@Aspect @Aspect
public static class Test005B extends Test005 { public static class Test005B extends Test005 {

+ 1
- 1
tests/java5/ataspectj/ataspectj/misuse/Test006.java View File

import org.aspectj.lang.annotation.*; import org.aspectj.lang.annotation.*;


@Aspect @Aspect
public class Test006{
public abstract class Test006{
} }
class Test006B extends Test006{ class Test006B extends Test006{
@Before("call(* org..*(..))") @Before("call(* org..*(..))")

+ 4
- 7
tests/src/org/aspectj/systemtest/ajc150/ataspectj/misuse.xml View File



<suite> <suite>


<comment>this one is ok - too simple - could be removed..</comment>
<ajc-test dir="java5/ataspectj" <ajc-test dir="java5/ataspectj"
pr="" title="@Aspect class extending @Aspect class"> pr="" title="@Aspect class extending @Aspect class">
<compile files="ataspectj/misuse/Test005.java" options="-1.5 -Xdev:NoAtAspectJProcessing"> <compile files="ataspectj/misuse/Test005.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
</compile> </compile>
</ajc-test> </ajc-test>


<comment>just a warning - might be skept if further optimized in Aj5Attributes..</comment>
<ajc-test dir="java5/ataspectj" <ajc-test dir="java5/ataspectj"
pr="" title="class with @Before extending @Aspect class"> pr="" title="class with @Before extending @Aspect class">
<compile files="ataspectj/misuse/Test006.java" options="-1.5 -Xdev:NoAtAspectJProcessing"> <compile files="ataspectj/misuse/Test006.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
<!-- FIXME AV - optim in place. Check and remove useless test -->
<!--<message kind="warning" line="11" text="Found @AspectJ annotations in a non @Aspect type 'ataspectj.misuse.Test006B'"/>-->
<message kind="error" line="11" text="class 'Test006B' can not extend aspect"/>
</compile> </compile>
</ajc-test> </ajc-test>


<ajc-test dir="java5/ataspectj" <ajc-test dir="java5/ataspectj"
pr="" title="@Pointcut not returning void"> pr="" title="@Pointcut not returning void">
<compile files="ataspectj/misuse/Test008.java" options="-1.5 -Xdev:NoAtAspectJProcessing"> <compile files="ataspectj/misuse/Test008.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
<message kind="warning" line="9" text="Found @Pointcut on a method not returning void 'someCall()I'"/>
<message kind="warning" line="9" text="Found @Pointcut on a method not returning void"/>
</compile> </compile>
</ajc-test> </ajc-test>


<ajc-test dir="java5/ataspectj" <ajc-test dir="java5/ataspectj"
pr="" title="@Pointcut with garbage string"> pr="" title="@Pointcut with garbage string">
<compile files="ataspectj/misuse/Test014.java" options="-1.5 -Xdev:NoAtAspectJProcessing -Xlint:ignore"> <compile files="ataspectj/misuse/Test014.java" options="-1.5 -Xdev:NoAtAspectJProcessing -Xlint:ignore">
<message kind="error" line="7" text="Cannot parse @Pointcut 'call%dddd"/>
<message kind="error" line="7" text="Invalid pointcut 'call%dddd"/>
<message kind="error" text="can't find referenced pointcut"/> <message kind="error" text="can't find referenced pointcut"/>
<message kind="error" text="can't find pointcut"/> <message kind="error" text="can't find pointcut"/>
<message kind="error" text="@AfterThrowing: either 'value' or 'poincut' must be provided, not both"/> <message kind="error" text="@AfterThrowing: either 'value' or 'poincut' must be provided, not both"/>
<ajc-test dir="java5/ataspectj" <ajc-test dir="java5/ataspectj"
pr="" title="@Pointcut with throws clause"> pr="" title="@Pointcut with throws clause">
<compile files="ataspectj/misuse/Test016.java" options="-1.5 -Xdev:NoAtAspectJProcessing"> <compile files="ataspectj/misuse/Test016.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
<message kind="warning" line="7" text="Found @Pointcut on a method throwing exception 'someCall()V'"/>
<message kind="warning" line="7" text="Found @Pointcut on a method throwing exception"/>
</compile> </compile>
</ajc-test> </ajc-test>



Loading…
Cancel
Save