Browse Source

233838: testcode: itd and declare precedence

tags/V1_6_1x
aclement 16 years ago
parent
commit
0ad779a799

+ 17
- 0
tests/bugs161/pr233838/Z.java View File

@@ -0,0 +1,17 @@
interface X {
static aspect IMPL {
public void X.test() { System.out.println("X.test()"); }
}
}

interface Y {
static aspect IMPL {
declare precedence : X.IMPL, Y.IMPL;

public void Y.test() { System.out.println("Y.test()"); }
}
}

public class Z implements X, Y {
public static void main(String[] args) throws Exception { new Z().test(); }
}

+ 17
- 0
tests/bugs161/pr233838/Z2.java View File

@@ -0,0 +1,17 @@
interface X {
static aspect IMPL {
public void X.test() { System.out.println("X.test()"); }
}
}

interface Y {
static aspect IMPL {
declare precedence : Y.IMPL, X.IMPL;

public void Y.test() { System.out.println("Y.test()"); }
}
}

public class Z2 implements X, Y {
public static void main(String[] args) throws Exception { new Z2().test(); }
}

+ 2
- 0
tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java View File

@@ -19,6 +19,8 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// AspectJ1.6.1
public void testITDPrecedence_pr233838_1() { runTest("itd precedence - 1"); }
public void testITDPrecedence_pr233838_2() { runTest("itd precedence - 2"); }
public void testGetFieldGenerics_pr227401() { runTest("getfield problem with generics");}
public void testGenericAbstractAspects_pr231478() { runTest("generic abstract aspects"); }
public void testFieldJoinpointsAndAnnotationValues_pr227993() { runTest("field jp anno value"); }

+ 19
- 0
tests/src/org/aspectj/systemtest/ajc161/ajc161.xml View File

@@ -3,6 +3,25 @@
<!-- AspectJ v1.6.1 Tests -->
<suite>

<ajc-test dir="bugs161/pr233838" title="itd precedence - 1">
<compile files="Z.java" options="-1.5"/>
<run class="Z">
<stdout>
<line text="X.test()"/>
</stdout>
</run>
</ajc-test>

<ajc-test dir="bugs161/pr233838" title="itd precedence - 2">
<compile files="Z2.java" options="-1.5"/>
<run class="Z2">
<stdout>
<line text="Y.test()"/>
</stdout>
</run>
</ajc-test>

<ajc-test dir="bugs161/pr227401" title="getfield problem with generics">
<compile files="Instrumentation.java Fails.java" options="-1.5"/>
<run class="Fails">

Loading…
Cancel
Save