summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2010-12-06 19:52:49 +0000
committeraclement <aclement>2010-12-06 19:52:49 +0000
commit12eed0f91f89eacd174db55382e1b2e5ac61ddc8 (patch)
tree1e7941bed04f66a3a3a3a9c4a3f3097ba752a767 /tests
parent3b6a7cf320f279dab39222e4e87dcd3655cdc16f (diff)
downloadaspectj-12eed0f91f89eacd174db55382e1b2e5ac61ddc8.tar.gz
aspectj-12eed0f91f89eacd174db55382e1b2e5ac61ddc8.zip
itd inners - fixed: needed a reference or wouldn't create the attribute.
Diffstat (limited to 'tests')
-rw-r--r--tests/features169/itdInnerTypes/separate2/Basic.java11
-rw-r--r--tests/features169/itdInnerTypes/separate2/Basic2.java6
-rw-r--r--tests/src/org/aspectj/systemtest/ajc169/IntertypeTests.java8
-rw-r--r--tests/src/org/aspectj/systemtest/ajc169/intertype.xml10
4 files changed, 35 insertions, 0 deletions
diff --git a/tests/features169/itdInnerTypes/separate2/Basic.java b/tests/features169/itdInnerTypes/separate2/Basic.java
new file mode 100644
index 000000000..44aed7c7c
--- /dev/null
+++ b/tests/features169/itdInnerTypes/separate2/Basic.java
@@ -0,0 +1,11 @@
+public class Basic {
+ public static void main(String []argv) {
+ // new _();
+ System.out.println("done");
+ }
+}
+
+aspect XX {
+ public static class Basic._ {
+ }
+}
diff --git a/tests/features169/itdInnerTypes/separate2/Basic2.java b/tests/features169/itdInnerTypes/separate2/Basic2.java
new file mode 100644
index 000000000..f44b45b3d
--- /dev/null
+++ b/tests/features169/itdInnerTypes/separate2/Basic2.java
@@ -0,0 +1,6 @@
+public class Basic2 {
+ public static void main(String []argv) {
+ new Basic._();
+ System.out.println("done");
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc169/IntertypeTests.java b/tests/src/org/aspectj/systemtest/ajc169/IntertypeTests.java
index 6719b16ba..d18fe1320 100644
--- a/tests/src/org/aspectj/systemtest/ajc169/IntertypeTests.java
+++ b/tests/src/org/aspectj/systemtest/ajc169/IntertypeTests.java
@@ -60,6 +60,14 @@ public class IntertypeTests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("separate compilation");
}
+ /**
+ * Interestingly this test makes no reference in the type Basic to the new ITD'd inner type, this causes the Basic type to be
+ * missing the innertype attribute!
+ */
+ public void testSeparateCompilation2() throws Exception {
+ runTest("separate compilation - 2");
+ }
+
public void testErrorTargettingTypeThatAlreadyHasIt() {
runTest("already has it");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc169/intertype.xml b/tests/src/org/aspectj/systemtest/ajc169/intertype.xml
index de6854faf..063bee514 100644
--- a/tests/src/org/aspectj/systemtest/ajc169/intertype.xml
+++ b/tests/src/org/aspectj/systemtest/ajc169/intertype.xml
@@ -11,6 +11,16 @@
</stdout>
</run>
</ajc-test>
+
+ <ajc-test dir="features169/itdInnerTypes/separate2" title="separate compilation - 2">
+ <compile files="Basic.java" options="-1.5"/>
+ <compile files="Basic2.java"/>
+ <run class="Basic2">
+ <stdout>
+ <line text="done"/>
+ </stdout>
+ </run>
+ </ajc-test>
<ajc-test dir="features169/itdInnerTypes/eleven" title="already has it">
<compile files="Target.java Aspect1.java" options="-1.5">