aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2010-06-03 19:36:04 +0000
committeraclement <aclement>2010-06-03 19:36:04 +0000
commite54ac87be2877bffb2bb107e0817403a2d4e62b4 (patch)
tree3649c4b643c9b4d7d74794011dc38dd704238c27
parent193e5449c987e952f5feeec47f76e3944660a0fe (diff)
downloadaspectj-e54ac87be2877bffb2bb107e0817403a2d4e62b4.tar.gz
aspectj-e54ac87be2877bffb2bb107e0817403a2d4e62b4.zip
315651
-rw-r--r--tests/bugs169/pr315651/test/Main.java12
-rw-r--r--tests/bugs169/pr315651/test/Profiling.aj17
-rw-r--r--tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java12
-rw-r--r--tests/src/org/aspectj/systemtest/ajc169/ajc169.xml5
4 files changed, 43 insertions, 3 deletions
diff --git a/tests/bugs169/pr315651/test/Main.java b/tests/bugs169/pr315651/test/Main.java
new file mode 100644
index 000000000..c62c920b6
--- /dev/null
+++ b/tests/bugs169/pr315651/test/Main.java
@@ -0,0 +1,12 @@
+
+package test;
+public class Main {
+
+ private static int plus(int first, int second){
+ return first + second;
+ }
+ public static void main(String[] args) {
+ int num = plus(42,13);
+ System.out.println(num);
+ }
+}
diff --git a/tests/bugs169/pr315651/test/Profiling.aj b/tests/bugs169/pr315651/test/Profiling.aj
new file mode 100644
index 000000000..2672a465e
--- /dev/null
+++ b/tests/bugs169/pr315651/test/Profiling.aj
@@ -0,0 +1,17 @@
+package test;
+
+public aspect Profiling {
+ pointcut profile(): execution(* *.*(..)) ;
+
+ private pointcut scope() :
+ if(condition())
+ //&& !(execution(* *.condition())) <- uncomment and infinite loop disappears
+ && !cflow(execution(* *.condition()));
+
+ public static boolean condition(){
+ return (Math.random()<2); //always true
+ }
+ before(): profile() && scope() {
+ System.out.println("Entering method "+thisJoinPointStaticPart.getSignature());
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java b/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java
index ee73f0fee..a350ed06c 100644
--- a/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java
@@ -18,17 +18,23 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
public class Ajc169Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+// public void testClashingDeclareAnnos_313026_1() {
+// runTest("clashing declare annos");
+// }
+
+ public void testInfiniteLoop_pr315651() {
+ runTest("infinite loop");
+ }
+
public void testAnnoType_pr314965() {
runTest("anno typo");
}
+
public void testValidateBranchRecursion_314840() {
runTest("validate branch recursion");
}
- public void testClashingDeclareAnnos_313026_1() {
- runTest("clashing declare annos");
- }
public void testClassFileSize_312839_1() {
runTest("class file size - 1");
diff --git a/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml b/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml
index bf21ff9da..3e5ba7b0e 100644
--- a/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml
+++ b/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml
@@ -2,6 +2,11 @@
<suite>
+ <ajc-test dir="bugs169/pr315651" title="infinite loop">
+ <compile files="test/Profiling.aj test/Main.java" options="-1.5"/>
+ <run class="test.Main"/>
+ </ajc-test>
+
<ajc-test dir="bugs169/pr314965" title="anno typo">
<compile files="MinimalExample.java" options="-1.5">
<message kind="warning" text="no match for this type name: AnnotationWithParamAndTypo [Xlint:invalidAbsoluteTypeName]"/>