Browse Source

tests for pr108370, enum switch in itd method with target type on the inpath

tags/preDefaultReweavable
acolyer 19 years ago
parent
commit
53c725aef7

+ 19
- 0
tests/bugs150/pr108370/EnumTest.aj View File

@@ -0,0 +1,19 @@
public aspect EnumTest {
public static enum Test {
A,B,C
}

public void et.Q.foo(Test t) {
switch (t) {
case B:
System.out.println("B!");
break;
}
}
public static void main(String[] args) {
et.Q q = new et.Q();
q.foo(Test.B);
q.foo(Test.C);
}
}

+ 2
- 0
tests/bugs150/pr108370/et/Q.java View File

@@ -0,0 +1,2 @@
package et;
public class Q {}

+ 4
- 0
tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java View File

@@ -314,6 +314,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("type variable with type variable bound");
}
public void testEnumSwitchInITD() {
runTest("switch on enum inside ITD method");
}
// helper methods.....
public SyntheticRepository createRepos(File cpentry) {

+ 11
- 1
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml View File

@@ -367,7 +367,17 @@
<compile files="pr108054.aj" options="-1.5"/>
<compile files="ISequence.java,ICounter.java,ASequence.java" options="-1.5"/>
</ajc-test>

<ajc-test dir="bugs150/pr108370" pr="108370" title="switch on enum inside ITD method">
<compile files="et/Q.java" options="-1.5"/>
<compile files="EnumTest.aj" options="-1.5 -inpath et"/>
<run class="EnumTest">
<stdout>
<line text="B!"/>
</stdout>
</run>
</ajc-test>
<!-- ============================================================================ -->
<!-- ============================================================================ -->

Loading…
Cancel
Save