aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2006-07-10 07:17:02 +0000
committeraclement <aclement>2006-07-10 07:17:02 +0000
commit0ad3ad91ae096f906b9ca964dd4cd9f1cb526a60 (patch)
tree5e7a34a7547e355e8c2a5c05657ddaa9c0a6ca4a /tests
parent5c20db9edf8ecda77db8ad56288f615b11db1385 (diff)
downloadaspectj-0ad3ad91ae096f906b9ca964dd4cd9f1cb526a60.tar.gz
aspectj-0ad3ad91ae096f906b9ca964dd4cd9f1cb526a60.zip
145018: moved 152>153
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs152/pr145018/Broken.aj42
-rw-r--r--tests/bugs153/pr145018/Broken.aj30
-rw-r--r--tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java6
-rw-r--r--tests/src/org/aspectj/systemtest/ajc153/ajc153.xml11
4 files changed, 42 insertions, 47 deletions
diff --git a/tests/bugs152/pr145018/Broken.aj b/tests/bugs152/pr145018/Broken.aj
deleted file mode 100644
index 373513776..000000000
--- a/tests/bugs152/pr145018/Broken.aj
+++ /dev/null
@@ -1,42 +0,0 @@
-import java.util.*;
-import org.aspectj.lang.annotation.*;
-
-@Aspect
-public class Broken {
-
- @Pointcut("call( * *.someMethod(..)) && args(arg1, arg2, arg3, status) ")
- public void someMethod2( int arg1, int arg2, int arg3, Status status ) {}
-
- @Pointcut("someMethod2(arg1, arg2, arg3, status) && if()")
- public static boolean someMethod2if(int arg1, int arg2, int arg3, Status status) {
- return status.equals( Status.DELETED );
- }
-
- @Pointcut("cflow(execution( * *.doProcess(..) ) && args( context, *, args)) && this(SomeClass+) ")
- public void inSomeClass2(Context context, Map args) {}
-
- @After( "inSomeClass2(context,args) && someMethod2if(arg1, arg2, arg3, status) ")
- public void deleteManagerInSomeClass2( Context context, Map args, int arg1, int arg2, int arg3, Status status) {
-// _log.write( DEBUG, "STATUS2: " + status );
- }
-}
-
-class Status {
- public final static int DELETED = 1;
-}
-
-class Context {}
-
-class SomeClass {
-
- public void doProcess(Context c,Object o, Map m) {
-
- someMethod(1,2,3,new Status());
- someMethod(1,2,3,new Status());
- someMethod(1,2,3,new Status());
- }
-
- public void someMethod(int a, int b, int c, Status s) {
- doProcess(null,null,null);
- }
-}
diff --git a/tests/bugs153/pr145018/Broken.aj b/tests/bugs153/pr145018/Broken.aj
new file mode 100644
index 000000000..adde2e9e4
--- /dev/null
+++ b/tests/bugs153/pr145018/Broken.aj
@@ -0,0 +1,30 @@
+import java.util.*;
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public class Broken {
+
+ @Pointcut("call(* someMethod(..)) && args(arg1) && if()")
+ public static boolean someMethod2if(int arg1) {
+ return true;
+ }
+
+ @Pointcut("cflow(execution(* doProcess(..) ) && args(*, args)) && this(SomeClass+) ")
+ public void inSomeClass2(Map args) {}
+
+ @After( "inSomeClass2(args) && someMethod2if(arg1) ")
+ public void deleteManagerInSomeClass2(Map args,int arg1) { }
+
+ public static void main(String[] args) {
+ new SomeClass().doProcess("a",new HashMap());
+ }
+}
+
+class SomeClass {
+
+ public void doProcess(Object o, Map m) {
+ someMethod(1);
+ }
+
+ public void someMethod(int a) { }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
index 6c844d749..0bd75f3d7 100644
--- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
@@ -36,11 +36,9 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// public void testVisibilityProblem_pr149071() { runTest("visibility problem");}
// public void testAdviceNotWovenAspectPath_pr147841() { runTest("advice not woven on aspectpath");}
public void testGenericSignatures_pr148409() { runTest("generic signature problem"); }
+// public void testBrokenIfArgsCflowAtAj_pr145018() { runTest("ataj crashing with cflow, if and args");}
+ public void testCantFindType_pr149322_1() {runTest("can't find type on interface call");}
- public void testCantFindType_pr149322_1() {
- runTest("can't find type on interface call");
- }
-
/////////////////////////////////////////
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 fc8b35470..c55cc6bb2 100644
--- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
+++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
@@ -96,7 +96,16 @@
<line text="foo"/>
</stderr>
</run>
- </ajc-test>
+ </ajc-test>
+
+ <ajc-test dir="bugs153/pr145018" title="ataj crashing with cflow, if and args">
+ <compile files="Broken.aj" options="-1.5"/>
+ <run class="Broken">
+ <stderr>
+ <line text="ahhh"/>
+ </stderr>
+ </run>
+ </ajc-test>
<ajc-test dir="bugs153/pr149322" title="can't find type on interface call">
<compile files="Interface.java"/>