checkClasses("deleted", d, deleted) \r
\r
\r
+"""\r
+Pure Java tests\r
+"""\r
+\r
+makeType("p1.Hello")\r
+test(batch=1, changed="Hello")\r
+\r
+test()\r
+\r
+makeType("p1.Hello", stmts="Target.staticM();")\r
+test(errors="Hello:5")\r
+\r
+test(errors="Hello:5")\r
+\r
+makeType("p1.Target", body="static void staticM() {}")\r
+test(changed=["Hello", "Target"])\r
+\r
+deleteType("p1.Target")\r
+test(errors="Hello:5")\r
+\r
+makeType("p1.Target", body="static void staticM() { int x = 2; }")\r
+test(changed=["Target", "Hello"])\r
+\r
+makeType("p1.Target", body="""static void staticM() { System.out.println("foo"); }""")\r
+test(changed=["Target"])\r
+\r
+makeType("p1.Target", body="static int staticM() { return 2; }")\r
+test(changed=["Hello", "Target"])\r
+\r
+makeType("p1.Hello", body="static class Inner {}")\r
+test(changed=["Hello", "Hello$Inner"])\r
+\r
+\r
+deleteType("p1.Hello")\r
+test(deleted=["Hello", "Hello$Inner"])\r
+\r
+makeType("p1.Hello", body="static class NewInner {}")\r
+test(changed=["Hello", "Hello$NewInner"])\r
+\r
+makeType("p1.Hello", body="")\r
+test(changed=["Hello"], deleted=["Hello$NewInner"])\r
+\r
+print "done", errorList\r
+sys.exit(0)\r
+\r
+\r
+\r
+"""\r
+Simple tests with aspects\r
+"""\r
+\r
+makeType("p1.Hello")\r
+test(batch=1, changed="Hello")\r
+\r
+makeType("p1.A", kind="aspect", body="before(): within(String) { }")\r
+test(changed=["A"], couldChange=["Hello"])\r
+\r
+makeType("p1.Hello")\r
+makeType("p1.A", kind="aspect", body="before(): execution(* main(..)) { }")\r
+test(changed=["A", "Hello"])\r
+\r
+makeType("p1.A", kind="aspect", body="before(): within(Hello) { }")\r
+test(changed=["A", "Hello"])\r
+\r
+makeType("p1.Target")\r
+test(changed="Target")\r
+\r
+makeType("p1.Hello", stmts="new Target().m();")\r
+test(errors=["Hello:5"])\r
+\r
+makeType("p1.ATypes", kind="aspect", body="int Target.m() { return 10; }")\r
+test(changed=["Hello", "ATypes", "Target"], couldChange=["A"])\r
+\r
+makeType("p1.ATypes", kind="aspect", body="int Target.m(int x) { return x + 10; }")\r
+test(errors=["Hello:5"])\r
+\r
+makeType("p1.Hello", stmts="new Target().m(2);")\r
+test(changed="Hello")\r
+\r
+makeType("p1.Hello", stmts="new Target().m(5);")\r
+test(changed="Hello")\r
+\r
+makeType("p1.Hello", stmts="new Target().m(42);")\r
+test(changed="Hello")\r
+\r
+\r
+\r
+print "done", errorList\r
+sys.exit(0)\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
\r
"""\r
Bugzilla Bug 29684 \r
sys.exit(0)\r
\r
\r
-"""\r
-Simple tests with aspects\r
-"""\r
-\r
-makeType("p1.Hello")\r
-test(batch=1, changed="Hello")\r
-\r
-makeType("p1.A", kind="aspect", body="before(): within(String) { }")\r
-test(changed=["A"], couldChange=["Hello"])\r
-\r
-makeType("p1.A", kind="aspect", body="before(): within(Hello) { }")\r
-test(changed=["A", "Hello"])\r
-\r
-makeType("p1.Target")\r
-test(changed="Target")\r
-\r
-makeType("p1.Hello", stmts="new Target().m();")\r
-test(errors=["Hello:5"])\r
-\r
-makeType("p1.ATypes", kind="aspect", body="int Target.m() { return 10; }")\r
-test(changed=["Hello", "ATypes", "Target"], couldChange=["A"])\r
-\r
-makeType("p1.ATypes", kind="aspect", body="int Target.m(int x) { return x + 10; }")\r
-test(errors=["Hello:5"])\r
-\r
-makeType("p1.Hello", stmts="new Target().m(2);")\r
-test(changed="Hello")\r
-\r
-print "done", errorList\r
-sys.exit(0)\r
\r
"""\r
Bugzilla Bug 28807 \r
sys.exit(0)\r
\r
\r
-"""\r
-Pure Java tests\r
-"""\r
-\r
-makeType("p1.Hello")\r
-test(batch=1, changed="Hello")\r
-\r
-test()\r
-\r
-makeType("p1.Hello", stmts="Target.staticM();")\r
-test(errors="Hello:5")\r
-\r
-makeType("p1.Target", body="static void staticM() {}")\r
-test(changed=["Hello", "Target"])\r
-\r
-makeType("p1.Target", body="""static void staticM() { System.out.println("foo"); }""")\r
-test(changed=["Target"])\r
-\r
-makeType("p1.Target", body="static int staticM() { return 2; }")\r
-test(changed=["Hello", "Target"])\r
-\r
-makeType("p1.Hello", body="static class Inner {}")\r
-test(changed=["Hello", "Hello$Inner"])\r
-\r
-deleteType("p1.Hello")\r
-test(deleted=["Hello", "Hello$Inner"])\r
-\r
-print "done", errorList
\ No newline at end of file