diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs150/pr112783.aj | 2 | ||||
-rw-r--r-- | tests/bugs150/pr113066/Consts.java | 2 | ||||
-rw-r--r-- | tests/bugs150/pr113066/Consts2.java | 4 | ||||
-rw-r--r-- | tests/bugs150/pr113066/Consts3.java | 5 | ||||
-rw-r--r-- | tests/bugs150/pr113066/TestNPE2.java | 4 | ||||
-rw-r--r-- | tests/bugs150/pr113066/TestNPE3.java | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java | 8 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 12 |
8 files changed, 35 insertions, 6 deletions
diff --git a/tests/bugs150/pr112783.aj b/tests/bugs150/pr112783.aj index b8ef21e53..b424fe5e7 100644 --- a/tests/bugs150/pr112783.aj +++ b/tests/bugs150/pr112783.aj @@ -10,4 +10,4 @@ class NotYetABean { public NotYetABean(Long l) { } -}
\ No newline at end of file +} diff --git a/tests/bugs150/pr113066/Consts.java b/tests/bugs150/pr113066/Consts.java index d79bcbdec..e1f76e091 100644 --- a/tests/bugs150/pr113066/Consts.java +++ b/tests/bugs150/pr113066/Consts.java @@ -1,4 +1,4 @@ package a; public class Consts { - static String A_CONST="bla"; + static String A_CONST="bla"; // default visibility - will be OK, TestNPE is in the same package } diff --git a/tests/bugs150/pr113066/Consts2.java b/tests/bugs150/pr113066/Consts2.java new file mode 100644 index 000000000..ac145d1a4 --- /dev/null +++ b/tests/bugs150/pr113066/Consts2.java @@ -0,0 +1,4 @@ +package a; +public class Consts2 { + private static String A_CONST="bla"; // Should get error in TestNPE - it can't see this to import it. +} diff --git a/tests/bugs150/pr113066/Consts3.java b/tests/bugs150/pr113066/Consts3.java new file mode 100644 index 000000000..1cf722b55 --- /dev/null +++ b/tests/bugs150/pr113066/Consts3.java @@ -0,0 +1,5 @@ +package a; +public class Consts3 { + protected static String A_CONST="bla"; // should be ok, TestNPE3 is a subclass of Consts + +} diff --git a/tests/bugs150/pr113066/TestNPE2.java b/tests/bugs150/pr113066/TestNPE2.java new file mode 100644 index 000000000..9682dc840 --- /dev/null +++ b/tests/bugs150/pr113066/TestNPE2.java @@ -0,0 +1,4 @@ +package a; +import static a.Consts2.A_CONST; +public class TestNPE2 {} + diff --git a/tests/bugs150/pr113066/TestNPE3.java b/tests/bugs150/pr113066/TestNPE3.java new file mode 100644 index 000000000..3ae7c4184 --- /dev/null +++ b/tests/bugs150/pr113066/TestNPE3.java @@ -0,0 +1,4 @@ +package a; +import static a.Consts3.A_CONST; +public class TestNPE3 extends a.Consts3 {} + diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index 915c55794..9faf3872f 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -42,16 +42,18 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { return new File("../tests/src/org/aspectj/systemtest/ajc150/ajc150.xml"); } - public void testCantCallSuperMethods_pr90143() { runTest("cant call super methods");} /* public void testBrokenDispatchByITD_pr72834() { runTest("broken dispatch");} public void testMissingAccessor_pr73856() { runTest("missing accessor");} public void testCunningDeclareParents_pr92311() { runTest("cunning declare parents");} public void testGenericITDsAndAbstractMethodError_pr102357() { runTest("generic itds and abstract method error");} - public void testITDCtor_pr112783() { runTest("Problem with constructor ITDs");} */ - public void testPossibleStaticImports_pr113066() { runTest("possible static imports bug");} + public void testPossibleStaticImports_pr113066_1() { runTest("possible static imports bug - 1");} + public void testPossibleStaticImports_pr113066_2() { runTest("possible static imports bug - 2");} + public void testPossibleStaticImports_pr113066_3() { runTest("possible static imports bug - 3");} + public void testITDCtor_pr112783() { runTest("Problem with constructor ITDs");} + public void testCantCallSuperMethods_pr90143() { runTest("cant call super methods");} public void testBrokenDecp_pr112476() { runTest("binary weaving decp broken");} public void testUnboundFormal_pr112027() { runTest("unexpected error unboundFormalInPC");} public void testNPEScopeSetup_pr115038() { runTest("NPE in ensureScopeSetup");} diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 4dab46ce2..b502511ee 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -18,10 +18,20 @@ </ajc-test> - <ajc-test dir="bugs150/pr113066" title="possible static imports bug"> + <ajc-test dir="bugs150/pr113066" title="possible static imports bug - 1"> <compile files="Consts.java,TestNPE.java" options="-1.5"/> </ajc-test> + <ajc-test dir="bugs150/pr113066" title="possible static imports bug - 2"> + <compile files="Consts2.java,TestNPE2.java" options="-1.5"> + <message kind="error" line="2" text="The import a.Consts2.A_CONST cannot be resolved"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs150/pr113066" title="possible static imports bug - 3"> + <compile files="Consts3.java,TestNPE3.java" options="-1.5"/> + </ajc-test> + <ajc-test dir="java5/staticImports" title="import static java.lang.System.out"> <compile files="StaticImport.aj" options="-1.5"/> </ajc-test> |