From 1b7db2522cd2851bc2ba31bf89437d370df06c44 Mon Sep 17 00:00:00 2001 From: jhugunin Date: Wed, 22 Jan 2003 00:52:42 +0000 Subject: test for Bugzilla Bug 29684 Incremental: Commenting out conflict yeilds NullPointerException --- tests/scripts/incr.py | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) (limited to 'tests/scripts/incr.py') 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 -- cgit v1.2.3