From: aclement Date: Thu, 3 Jun 2010 19:36:04 +0000 (+0000) Subject: 315651 X-Git-Tag: PRE_PUSHIN~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e54ac87be2877bffb2bb107e0817403a2d4e62b4;p=aspectj.git 315651 --- 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 @@ + + + + +