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

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

package et;
public class Q {}

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

runTest("type variable with type variable bound"); runTest("type variable with type variable bound");
} }
public void testEnumSwitchInITD() {
runTest("switch on enum inside ITD method");
}
// helper methods..... // helper methods.....
public SyntheticRepository createRepos(File cpentry) { public SyntheticRepository createRepos(File cpentry) {

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

<compile files="pr108054.aj" options="-1.5"/> <compile files="pr108054.aj" options="-1.5"/>
<compile files="ISequence.java,ICounter.java,ASequence.java" options="-1.5"/> <compile files="ISequence.java,ICounter.java,ASequence.java" options="-1.5"/>
</ajc-test> </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