summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2006-10-03 15:00:34 +0000
committeraclement <aclement>2006-10-03 15:00:34 +0000
commit782ade25e6d68caf361f51a1e040edbd6855842b (patch)
tree0ff9aff34b8d7757ad238fc84a32bf753a759786 /tests
parent7b831ff7356725b9872a9635d1e0eeb035f2790b (diff)
downloadaspectj-782ade25e6d68caf361f51a1e040edbd6855842b.tar.gz
aspectj-782ade25e6d68caf361f51a1e040edbd6855842b.zip
test and fix for 156904: missing type warning then it matches anyway
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs153/pr156904/inDiffPkgAndImport/A.aj12
-rw-r--r--tests/bugs153/pr156904/inDiffPkgAndImport/Outer.java8
-rw-r--r--tests/bugs153/pr156904/inDiffPkgWithoutImport/A.aj10
-rw-r--r--tests/bugs153/pr156904/inDiffPkgWithoutImport/Outer.java8
-rw-r--r--tests/bugs153/pr156904/inSameFile/A.aj19
-rw-r--r--tests/bugs153/pr156904/inSamePkg/A.aj11
-rw-r--r--tests/bugs153/pr156904/inSamePkg/Outer.java10
-rw-r--r--tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java8
-rw-r--r--tests/src/org/aspectj/systemtest/ajc153/ajc153.xml18
9 files changed, 103 insertions, 1 deletions
diff --git a/tests/bugs153/pr156904/inDiffPkgAndImport/A.aj b/tests/bugs153/pr156904/inDiffPkgAndImport/A.aj
new file mode 100644
index 000000000..99fa65826
--- /dev/null
+++ b/tests/bugs153/pr156904/inDiffPkgAndImport/A.aj
@@ -0,0 +1,12 @@
+package pkg;
+
+import pkg1.*;
+
+public aspect A {
+
+ pointcut innerpointcut() : execution( * Outer.myMethod() );
+
+ before() : innerpointcut() {
+ System.out.println( "executing!" );
+ }
+}
diff --git a/tests/bugs153/pr156904/inDiffPkgAndImport/Outer.java b/tests/bugs153/pr156904/inDiffPkgAndImport/Outer.java
new file mode 100644
index 000000000..df7256a0d
--- /dev/null
+++ b/tests/bugs153/pr156904/inDiffPkgAndImport/Outer.java
@@ -0,0 +1,8 @@
+package pkg1;
+
+class Outer {
+
+ private void myMethod(){
+ }
+
+}
diff --git a/tests/bugs153/pr156904/inDiffPkgWithoutImport/A.aj b/tests/bugs153/pr156904/inDiffPkgWithoutImport/A.aj
new file mode 100644
index 000000000..bb158a517
--- /dev/null
+++ b/tests/bugs153/pr156904/inDiffPkgWithoutImport/A.aj
@@ -0,0 +1,10 @@
+package pkg;
+
+public aspect A {
+
+ pointcut innerpointcut() : execution( * Outer.myMethod() );
+
+ before() : innerpointcut() {
+ System.out.println( "executing!" );
+ }
+}
diff --git a/tests/bugs153/pr156904/inDiffPkgWithoutImport/Outer.java b/tests/bugs153/pr156904/inDiffPkgWithoutImport/Outer.java
new file mode 100644
index 000000000..df7256a0d
--- /dev/null
+++ b/tests/bugs153/pr156904/inDiffPkgWithoutImport/Outer.java
@@ -0,0 +1,8 @@
+package pkg1;
+
+class Outer {
+
+ private void myMethod(){
+ }
+
+}
diff --git a/tests/bugs153/pr156904/inSameFile/A.aj b/tests/bugs153/pr156904/inSameFile/A.aj
new file mode 100644
index 000000000..ab0462065
--- /dev/null
+++ b/tests/bugs153/pr156904/inSameFile/A.aj
@@ -0,0 +1,19 @@
+package pkg;
+
+public aspect A {
+
+ pointcut innerpointcut() : execution( * Outer.Inner.myMethod() );
+
+ before() : innerpointcut() {
+ System.out.println( "executing!" );
+ }
+
+}
+
+class Outer {
+
+ private class Inner{
+ private void myMethod(){
+ }
+ }
+}
diff --git a/tests/bugs153/pr156904/inSamePkg/A.aj b/tests/bugs153/pr156904/inSamePkg/A.aj
new file mode 100644
index 000000000..cff99d7c8
--- /dev/null
+++ b/tests/bugs153/pr156904/inSamePkg/A.aj
@@ -0,0 +1,11 @@
+package pkg;
+
+public aspect A {
+
+ pointcut innerpointcut() : execution( * Outer.Inner.myMethod() );
+
+ before() : innerpointcut() {
+ System.out.println( "executing!" );
+ }
+
+}
diff --git a/tests/bugs153/pr156904/inSamePkg/Outer.java b/tests/bugs153/pr156904/inSamePkg/Outer.java
new file mode 100644
index 000000000..09913935d
--- /dev/null
+++ b/tests/bugs153/pr156904/inSamePkg/Outer.java
@@ -0,0 +1,10 @@
+package pkg;
+
+class Outer {
+
+ private class Inner{
+ private void myMethod(){
+ }
+ }
+
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
index ee11353fb..9f2ff8775 100644
--- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
@@ -134,7 +134,13 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("NPE with custom agent");
}
- /////////////////////////////////////////
+ public void testNoInvalidAbsoluteTypeNameWarning_pr156904_1() {runTest("ensure no invalidAbsoluteTypeName when do match - 1");}
+ public void testNoInvalidAbsoluteTypeNameWarning_pr156904_2() {runTest("ensure no invalidAbsoluteTypeName when do match - 2");}
+ public void testNoInvalidAbsoluteTypeNameWarning_pr156904_3() {runTest("ensure no invalidAbsoluteTypeName when do match - 3");}
+ public void testNoInvalidAbsoluteTypeNameWarning_pr156904_4() {runTest("ensure no invalidAbsoluteTypeName when do match - 4");}
+
+
+ /////////////////////////////////////////
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc153Tests.class);
}
diff --git a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
index ea791e8d0..c2d54e4d1 100644
--- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
+++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
@@ -494,6 +494,24 @@
<compile files="SampleTest.java"/>
</ajc-test>
+ <ajc-test dir="bugs153/pr156904/inSameFile" title="ensure no invalidAbsoluteTypeName when do match - 1">
+ <compile files="A.aj"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs153/pr156904/inDiffPkgAndImport" title="ensure no invalidAbsoluteTypeName when do match - 2">
+ <compile files="A.aj,Outer.java"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs153/pr156904/inSamePkg" title="ensure no invalidAbsoluteTypeName when do match - 3">
+ <compile files="A.aj,Outer.java"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs153/pr156904/inDiffPkgWithoutImport" title="ensure no invalidAbsoluteTypeName when do match - 4">
+ <compile files="A.aj,Outer.java">
+ <message kind="warning" line="5" text="no match for this type name: Outer [Xlint:invalidAbsoluteTypeName]"/>
+ </compile>
+ </ajc-test>
+
<ajc-test dir="ltw" title="NPE with custom agent" keywords="ltw">
<compile files="java/net/URLClassLoader.java"/>
<compile files="HelloWorld.java" options="-outjar hello.jar"/>