From: aclement Date: Tue, 30 May 2006 16:09:31 +0000 (+0000) Subject: test for 144465 X-Git-Tag: V1_5_2rc1~88 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b4a28a99e4e7afbf3cefb3b43a6432b24525d7b2;p=aspectj.git test for 144465 --- diff --git a/tests/bugs152/pr144465/AnAspect.java b/tests/bugs152/pr144465/AnAspect.java new file mode 100644 index 000000000..eff8137e8 --- /dev/null +++ b/tests/bugs152/pr144465/AnAspect.java @@ -0,0 +1,5 @@ +aspect AnAspect { + before(): staticinitialization(BigHorribleClass) { + + } +} \ No newline at end of file diff --git a/tests/bugs152/pr144465/BigHorribleClass.java b/tests/bugs152/pr144465/BigHorribleClass.java new file mode 100644 index 000000000..7668307b2 --- /dev/null +++ b/tests/bugs152/pr144465/BigHorribleClass.java @@ -0,0 +1,28 @@ +import java.io.Serializable; +import java.lang.reflect.Field; + +public class BigHorribleClass implements Serializable,Comparable { + public static void main(String[] args) { + try { + BigHorribleClass b = (BigHorribleClass)BigHorribleClass.class.newInstance(); + Field f = BigHorribleClass.class.getDeclaredField("serialVersionUID"); + long l = f.getLong(b); + System.err.println("SerialVersionUID is "+l); + } catch (Exception e) { + System.err.println("Problem: "+e.toString()); + } + } + + public int anInt; + + public static boolean aBoolean = false; + + public long foo = 376; + + public void m() {} + public int compareTo(Object o) { return 0;} + public String m2(boolean b,long l, String s) { return "";} + + public static transient short fo2 = 3; + +} \ No newline at end of file diff --git a/tests/bugs152/pr144465/aop1.xml b/tests/bugs152/pr144465/aop1.xml new file mode 100644 index 000000000..d429edb23 --- /dev/null +++ b/tests/bugs152/pr144465/aop1.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java index 67cb7c1db..7cb98a6ef 100644 --- a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java @@ -24,6 +24,7 @@ import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc152Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + public void testLTWAndGeneratingSUID_pr144465() { runTest("ltw with serialversionUID creation"); } public void testAspects14PerSingleton_pr122253() { runTest("aspects14 - persingleton");} public void testAspects14PerCflow_pr122253() { runTest("aspects14 - percflow");} public void testAspects14PerThis_pr122253() { runTest("aspects14 - perthis");} diff --git a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml index 5741576b1..03bbb19d6 100644 --- a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml +++ b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml @@ -339,6 +339,17 @@ + + + + + + + + + + +