aboutsummaryrefslogtreecommitdiffstats
path: root/tests/scripts
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-01-22 00:52:42 +0000
committerjhugunin <jhugunin>2003-01-22 00:52:42 +0000
commit1b7db2522cd2851bc2ba31bf89437d370df06c44 (patch)
tree9a6e0304dd5ca7f7c2818423dc00edccdc6799d3 /tests/scripts
parent5731eaec26015751b6f4195878e7d62ae8118094 (diff)
downloadaspectj-1b7db2522cd2851bc2ba31bf89437d370df06c44.tar.gz
aspectj-1b7db2522cd2851bc2ba31bf89437d370df06c44.zip
test for Bugzilla Bug 29684
Incremental: Commenting out conflict yeilds NullPointerException
Diffstat (limited to 'tests/scripts')
-rw-r--r--tests/scripts/incr.py60
1 files changed, 60 insertions, 0 deletions
diff --git a/tests/scripts/incr.py b/tests/scripts/incr.py
index 4904282c7..1e767aceb 100644
--- a/tests/scripts/incr.py
+++ b/tests/scripts/incr.py
@@ -203,6 +203,66 @@ def test(batch=0, couldChange=[], changed=[], deleted=[], errors=[]):
+"""
+Bugzilla Bug 29684
+ Incremental: Commenting out conflict yeilds NullPointerException
+
+public class SomeClass {
+
+ public String toString() {
+ return "from SomeClass";
+ }
+}
+
+public aspect Conflicter {
+
+ public String SomeClass.toString() {
+ return "from Conflicter";
+ }
+
+ public static void main(String[] args) {
+ int i = 0;
+ }
+}
+
+However, modifying Conflicter so that it reads:
+
+public aspect Conflicter {
+
+// public String SomeClass.toString() {
+// return "from Conflicter";
+// }
+
+ public static void main(String[] args) {
+ int i = 0;
+ }
+}
+
+
+"""
+makeType("conflict.SomeClass",
+ body="""public String toString() { return "from SomeClass"; }""")
+makeType("conflict.Conflicter", kind="aspect",
+ body="""public String SomeClass.toString() { return "from Conflicter"; }""")
+test(batch=1, errors=["Conflicter:3"])
+
+makeType("conflict.Conflicter", kind="aspect",
+ body="")
+test(changed=["SomeClass", "Conflicter"])
+
+makeType("conflict.Conflicter", kind="aspect",
+ body="""public String SomeClass.toString() { return "from Conflicter"; }""")
+test(errors=["Conflicter:3"])
+
+makeType("conflict.SomeClass",
+ body="")
+test(changed=["SomeClass"])
+
+
+
+print "done", errorList
+sys.exit(0)
+
"""
Simple tests with aspects