From: aclement Date: Thu, 8 Dec 2005 15:32:36 +0000 (+0000) Subject: testcode for 119210 X-Git-Tag: V1_5_0RC1~42 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f5f36e2dd0f1318f44397f691c480967c57dbfb4;p=aspectj.git testcode for 119210 --- diff --git a/tests/bugs150/pr119210/TestLib.java b/tests/bugs150/pr119210/TestLib.java new file mode 100644 index 000000000..09f1770a5 --- /dev/null +++ b/tests/bugs150/pr119210/TestLib.java @@ -0,0 +1,8 @@ +public class TestLib { + + public static void main(String[] args) { + System.err.println("obtaining five, got "+new TestLib().getFive()); + } + + public int getFive() { return 5; } +} \ No newline at end of file diff --git a/tests/bugs150/pr119210/TestLib2.java b/tests/bugs150/pr119210/TestLib2.java new file mode 100644 index 000000000..718eee2e8 --- /dev/null +++ b/tests/bugs150/pr119210/TestLib2.java @@ -0,0 +1,8 @@ +public class TestLib2 { + + public static void main(String[] args) { + System.err.println("obtaining five, got "+new TestLib2().getFive()); + } + + public Integer getFive() { return new Integer(5); } +} \ No newline at end of file diff --git a/tests/bugs150/pr119210/ThreadAspectLib.java b/tests/bugs150/pr119210/ThreadAspectLib.java new file mode 100644 index 000000000..b2c899499 --- /dev/null +++ b/tests/bugs150/pr119210/ThreadAspectLib.java @@ -0,0 +1,19 @@ +public aspect ThreadAspectLib { +// pointcut setThreadLocalsField(): set(private int TestLib.myInt); +// +// Integer around():setThreadLocalsField() +// { +// try{ +// return new Integer(2); +// } +// catch(Exception e) +// { +// e.printStackTrace(); +// return null; +// } +// } + + Integer around(): call(* getFive()) { + return new Integer(3); + } +} \ No newline at end of file diff --git a/tests/bugs150/pr119210/ThreadAspectLib2.java b/tests/bugs150/pr119210/ThreadAspectLib2.java new file mode 100644 index 000000000..1794c0a4d --- /dev/null +++ b/tests/bugs150/pr119210/ThreadAspectLib2.java @@ -0,0 +1,19 @@ +public aspect ThreadAspectLib2 { +// pointcut setThreadLocalsField(): set(private int TestLib.myInt); +// +// Integer around():setThreadLocalsField() +// { +// try{ +// return new Integer(2); +// } +// catch(Exception e) +// { +// e.printStackTrace(); +// return null; +// } +// } + + int around(): call(* getFive()) { + return 3; + } +} \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index 4d40e12a9..af9e8d3cf 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -42,7 +42,7 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { return new File("../tests/src/org/aspectj/systemtest/ajc150/ajc150.xml"); } - // public void testGenericPTW_pr119539_1() { runTest("generic pertypewithin aspect - 1");} + //public void testGenericPTW_pr119539_1() { runTest("generic pertypewithin aspect - 1");} //public void testGenericPTW_pr119539_2() { runTest("generic pertypewithin aspect - 2");} //public void testGenericPTW_pr119539_3() { runTest("generic pertypewithin aspect - 3");} /* @@ -79,7 +79,9 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testFieldGet_pr114343_2() { runTest("field-get, generics and around advice - 2");} public void testFieldGet_pr114343_3() { runTest("field-get, generics and around advice - 3");} public void testCaptureBinding_pr114744() { runTest("capturebinding wildcard problem");} - + public void testAutoboxingAroundAdvice_pr119210_1() { runTest("autoboxing around advice - 1");} + public void testAutoboxingAroundAdvice_pr119210_2() { runTest("autoboxing around advice - 2");} + public void testAutoboxingAroundAdvice_pr119210_3() { runTest("autoboxing around advice - 3");} public void testBadDecp_pr110788_1() { runTest("bad generic decp - 1");} public void testBadDecp_pr110788_2() { runTest("bad generic decp - 2");} public void testBadDecp_pr110788_3() { runTest("bad generic decp - 3");} diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 1834c22f7..19ad305c9 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -68,6 +68,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + +