summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2006-05-12 08:17:43 +0000
committeraclement <aclement>2006-05-12 08:17:43 +0000
commit5d2b5b8892cc6e714565326b70d7c6a4b7007129 (patch)
tree5b021aa2f81c7991cac1a043dbe262863a2d818c /tests
parent9d1f31f65bbf7e7d4b5e205d983201d724f97676 (diff)
downloadaspectj-5d2b5b8892cc6e714565326b70d7c6a4b7007129.tar.gz
aspectj-5d2b5b8892cc6e714565326b70d7c6a4b7007129.zip
test and fix for 138384: woven methods being >64k in code size
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs152/pr138384/BigMethod.java488
-rw-r--r--tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc152/ajc152.xml7
3 files changed, 496 insertions, 0 deletions
diff --git a/tests/bugs152/pr138384/BigMethod.java b/tests/bugs152/pr138384/BigMethod.java
new file mode 100644
index 000000000..ac68c32f0
--- /dev/null
+++ b/tests/bugs152/pr138384/BigMethod.java
@@ -0,0 +1,488 @@
+public class BigMethod {
+
+ public void i_am_a_big_method() {
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ for (int i = 0; i < 1; i++) {
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ System.out.print(".");
+ }
+ }
+
+ public static void main(String[] args) {
+ new BigMethod().i_am_a_big_method();
+ }
+}
+
+aspect GoBang {
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+ before(): call(* *(..)) && withincode(void i_am_a_big_method()) {
+ System.err.println("Kaboom");
+ }
+} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java
index 52f98d3b3..bb6e4994c 100644
--- a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java
@@ -17,6 +17,7 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
public class Ajc152Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ public void testMethodTooBigAfterWeaving_pr138384() { runTest("method too big"); }
public void testNotAtWithincode_pr138158_1() { runTest("not at withincode - 1");}
public void testNotAtWithincode_pr138158_2() { runTest("not at withincode - 2");}
public void testNotAtWithincode_pr138158_3() { runTest("not at within - 3");}
diff --git a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
index abcf47c50..eb90cdda9 100644
--- a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
+++ b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
@@ -20,6 +20,13 @@
<run class="StatisticsTypeImpl"/>
</ajc-test>
+ <ajc-test dir="bugs152/pr138384" title="method too big">
+ <compile files="BigMethod.java" options="-1.5"> <!-- will be 67628 bytes in the big method -->
+ <message kind="error" line="1" text="problem generating method BigMethod.i_am_a_big_method : Code size too big: 67629"/>
+ </compile>
+ <!--run class="BigMethod"/-->
+ </ajc-test>
+
<ajc-test dir="bugs152/pr138798" title="atWithinCodeBug">
<compile files="ErrorHandling.aj" options="-1.5"/>
<run class="ErrorHandling">