diff options
author | Andy Clement <andrew.clement@gmail.com> | 2012-08-17 14:31:53 -0700 |
---|---|---|
committer | Andy Clement <andrew.clement@gmail.com> | 2012-08-17 14:31:53 -0700 |
commit | d0c81b74d7c2254cea2b8820a1cabda158978e83 (patch) | |
tree | 72a7116e3266c8949543d2657e28466b15305b08 /tests/src/org | |
parent | 993cef1c34849b5a3c92f5ddf4839ccf9047da77 (diff) | |
download | aspectj-d0c81b74d7c2254cea2b8820a1cabda158978e83.tar.gz aspectj-d0c81b74d7c2254cea2b8820a1cabda158978e83.zip |
73507 - it'd fields on interfaces no longer get mangled names by default
Diffstat (limited to 'tests/src/org')
8 files changed, 87 insertions, 57 deletions
diff --git a/tests/src/org/aspectj/systemtest/AllTests17.java b/tests/src/org/aspectj/systemtest/AllTests17.java index 37a02c350..447ab1d51 100644 --- a/tests/src/org/aspectj/systemtest/AllTests17.java +++ b/tests/src/org/aspectj/systemtest/AllTests17.java @@ -12,7 +12,7 @@ import org.aspectj.systemtest.ajc171.AllTestsAspectJ171; public class AllTests17 { public static Test suite() { - TestSuite suite = new TestSuite("AspectJ System Test Suite - JDK 1.7"); + TestSuite suite = new TestSuite("AspectJ System Test Suite - 1.7"); // $JUnit-BEGIN$ suite.addTest(AllTestsAspectJ171.suite()); suite.addTest(AllTestsAspectJ170.suite()); diff --git a/tests/src/org/aspectj/systemtest/ajc10x/Ajc10xTests.java b/tests/src/org/aspectj/systemtest/ajc10x/Ajc10xTests.java index b9c913471..8128fcdaa 100644 --- a/tests/src/org/aspectj/systemtest/ajc10x/Ajc10xTests.java +++ b/tests/src/org/aspectj/systemtest/ajc10x/Ajc10xTests.java @@ -676,6 +676,10 @@ public class Ajc10xTests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("interfaces as mixins with introduction"); } + public void test161b() { + runTest("interfaces as mixins with introduction b"); + } + public void test162() { runTest("functional modifiers work correctly with introduced members"); } diff --git a/tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml b/tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml index 3d7d93a28..e93b9b150 100644 --- a/tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml +++ b/tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml @@ -1083,7 +1083,15 @@ <ajc-test dir="design/intro" title="interfaces as mixins with introduction" keywords="from-resolved_10x"> - <compile files="Interfaces.java"/> + <compile files="Interfaces.java"> + <message kind="error" text="can't override java.lang.String SubI.instanceField with java.lang.String SubC.instanceField visibility is reduced"/> + <message kind="error" text="can't override java.lang.String I.instanceField with java.lang.String C.instanceField visibility is reduced"/> + </compile> + </ajc-test> + + <ajc-test dir="design/intro" title="interfaces as mixins with introduction b" + keywords="from-resolved_10x"> + <compile files="Interfaces.java" options="-Xset:itdVersion=1"/> <run class="Interfaces"/> </ajc-test> diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 0abbbbea8..1ee0ee752 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -84,7 +84,7 @@ <run class="Declaration1"> <stdout> <line text="public java.lang.String Test.firstProperty has annotation:true"/> - <line text="public java.lang.String Test.ajc$interField$Declaration1$TestInterface$secondProperty has annotation:true"/> + <line text="public java.lang.String Test.secondProperty has annotation:true"/> </stdout> </run> </ajc-test> @@ -117,7 +117,7 @@ <run class="Declaration2"> <stdout> <line text="public java.lang.String Test.firstProperty has annotation:true"/> - <line text="public java.lang.String Test.ajc$interField$Declaration2$TestInterface$secondProperty has annotation:true"/> + <line text="public java.lang.String Test.secondProperty has annotation:true"/> </stdout> </run> </ajc-test> @@ -4636,7 +4636,11 @@ <run class="GenericAspectZ"/> </ajc-test> - + <ajc-test dir="java5/generics/binaryBridging" title="binary bridge methods - two"> + <compile files="TwoA.java" outjar="twoa.jar" options="-1.5"/> + <compile files="TwoB.java" outjar="twob.jar" options="-1.5"/> + <compile files="TwoX.java" inpath="twoa.jar;twob.jar" options="-1.5"/> + </ajc-test> <ajc-test dir="java5/generics/itds/sharing" title="method itd sharing type variable with generic type"> <compile files="Simple.aj" options="-1.5"/> diff --git a/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java b/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java index c9b1a7377..1f1017328 100644 --- a/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java @@ -156,24 +156,6 @@ public class Ajc170Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // more complex example, mix of them assertEquals("((call(* java.lang.String.*(..)) && this(java.lang.Object)) && call(* *(..)))",newp.toString()); } - -/* - public void testPublicITDFs_pr73507_1() { - runTest("public ITDfs - 1"); - } - - public void testPublicITDFs_pr73507_2() { - runTest("public ITDfs - 2"); - } - - public void testPublicITDFs_pr73507_3() { - runTest("public ITDfs - 3"); - } - - public void testPublicITDFs_pr73507_4() { - runTest("public ITDfs - 4"); - } -*/ public void testBCExceptionAnnoDecp_371998() { runTest("BCException anno decp"); diff --git a/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml b/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml index 1413eae39..28ea31dad 100644 --- a/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml +++ b/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml @@ -242,40 +242,6 @@ </stdout> </run> </ajc-test> - - <ajc-test dir="bugs170/pr73507" title="public ITDfs - 1"> - <compile files="Case1.java" options="-1.5"/> - <run class="Case1"> - <stdout> - <line text="Found a field called i"/> - </stdout> - </run> - </ajc-test> - - <ajc-test dir="bugs170/pr73507" title="public ITDfs - 2"> - <compile files="Case2.java" options="-1.5"/> - <run class="Case2"> - <stdout> - <line text="Value of C.i is 1"/> - </stdout> - </run> - </ajc-test> - - <ajc-test dir="bugs170/pr73507" title="public ITDfs - 3"> - <compile files="Case3.java" options="-1.5"/> - <run class="Case3"> - <stdout> - <line text="Value of C.i is 1"/> - <line text="Value of C.j is 1"/> - </stdout> - </run> - </ajc-test> - - <ajc-test dir="bugs170/pr73507" title="public ITDfs - 4"> - <compile files="Case4.java" options="-1.5"> - <message kind="error" line="13" text="can't override java.lang.String I.i with int C.i return types don't match"/> - </compile> - </ajc-test> <ajc-test dir="bugs170/pr371998" title="BCException anno decp"> <compile files="AspectTest.java" options="-1.5 -showWeaveInfo"> diff --git a/tests/src/org/aspectj/systemtest/ajc171/Ajc171Tests.java b/tests/src/org/aspectj/systemtest/ajc171/Ajc171Tests.java index 17c8ea4f5..a8dc9a678 100644 --- a/tests/src/org/aspectj/systemtest/ajc171/Ajc171Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc171/Ajc171Tests.java @@ -21,6 +21,26 @@ import org.aspectj.testing.XMLBasedAjcTestCase; */ public class Ajc171Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + public void testPublicITDFs_pr73507_1() { + runTest("public ITDfs - 1"); + } + + public void testPublicITDFs_pr73507_2() { + runTest("public ITDfs - 2"); + } + + public void testPublicITDFs_pr73507_3() { + runTest("public ITDfs - 3"); + } + + public void testPublicITDFs_pr73507_4() { + runTest("public ITDfs - 4"); + } + + public void testPublicITDFs_pr73507_5() { + runTest("public ITDfs - 5"); + } + public void testGenerics_384398() { runTest("generics itds"); } diff --git a/tests/src/org/aspectj/systemtest/ajc171/ajc171.xml b/tests/src/org/aspectj/systemtest/ajc171/ajc171.xml index d22d2d71a..d24aa9a3a 100644 --- a/tests/src/org/aspectj/systemtest/ajc171/ajc171.xml +++ b/tests/src/org/aspectj/systemtest/ajc171/ajc171.xml @@ -1,6 +1,52 @@ <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]> <suite> + + <ajc-test dir="bugs171/pr73507" title="public ITDfs - 1"> + <compile files="Case1.java" options="-1.5"/> + <run class="Case1"> + <stdout> + <line text="Found a field called i"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs171/pr73507" title="public ITDfs - 2"> + <compile files="Case2.java" options="-1.5"/> + <run class="Case2"> + <stdout> + <line text="Value of C.i is 1"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs171/pr73507" title="public ITDfs - 3"> + <compile files="Case3.java" options="-1.5"/> + <run class="Case3"> + <stdout> + <line text="Value of C.i is 1"/> + <line text="Value of C.j is 1"/> + <line text="Value of C.k is 5"/> + <line text="Value of I.i is 1"/> + <line text="Value of I.j is 1"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs171/pr73507" title="public ITDfs - 4"> + <compile files="Case4.java" options="-1.5"> + <message kind="error" line="13" text="can't override java.lang.String I.i with int C.i return types don't match"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs171/pr73507" title="public ITDfs - 5"> + <compile files="Case5.java" options="-1.5"/> + <run class="Case5"> + <stdout> + <line text="public java.lang.String C.str"/> + </stdout> + </run> + </ajc-test> <ajc-test dir="bugs171/pr384398" title="generics itds"> <compile files="A.java B.java BAspect.aj" options="-1.5"> |