Procházet zdrojové kódy

tests for pr84260: static imports

tags/PRE_ANDY
aclement před 19 roky
rodič
revize
f747b829d0

+ 6
- 0
tests/bugs150/pr84260/A.java Zobrazit soubor

@@ -0,0 +1,6 @@
package a.b.c;

public class A {

public static void m() {System.err.println("static method running");}
}

+ 6
- 0
tests/bugs150/pr84260/I1.java Zobrazit soubor

@@ -0,0 +1,6 @@
import static a.b.c.A.m;
public class I1 {
public static void main(String []argv) {
m();
}
}

+ 9
- 0
tests/bugs150/pr84260/I2.java Zobrazit soubor

@@ -0,0 +1,9 @@
import static a.b.c.A.*;

public class I2 {

public static void main(String []argv) {
m();
}

}

+ 4
- 0
tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java Zobrazit soubor

@@ -178,6 +178,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("NPE in reflect implementation");
}
public void testStaticImports_pr84260() {
runTest("static import failures");
}
// helper methods.....
public SyntheticRepository createRepos(File cpentry) {

+ 14
- 0
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml Zobrazit soubor

@@ -51,6 +51,20 @@
</compile>
</ajc-test>
<ajc-test dir="bugs150/pr84260" vm="1.5" title="static import failures">
<compile files="A.java,I1.java,I2.java" options="-1.5"/>
<run class="I1">
<stderr>
<line text="static method running"/>
</stderr>
</run>
<run class="I2">
<stderr>
<line text="static method running"/>
</stderr>
</run>
</ajc-test>
<ajc-test dir="decp" pr="80249" title="Order of types passed to compiler determines weaving behavior">
<compile files="A.java,B.java,AspectX.java"/>
<run class="B"/>

Načítá se…
Zrušit
Uložit