From fd15b7814e52fadb177624a16f45c20bff927e1a Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 3 Feb 2011 00:55:53 +0000 Subject: [PATCH] 336147 - tests --- .../pr336147/base/src/City_Roo_Op4j.java | 9 +++++ .../pr336147/inc1/src/Test.java | 5 +++ .../pr336147_2/base/src/City.java | 3 ++ .../pr336147_2/base/src/City_Roo_Op4j.java | 7 ++++ .../pr336147_2/inc1/src/Test.java | 5 +++ .../pr336147_3/base/src/City.java | 3 ++ .../pr336147_3/base/src/City_Roo_Op4j.java | 7 ++++ .../pr336147_3/base/src/Test.java | 5 +++ .../tools/IncrementalCompilationTests.java | 38 +++++++++++++++++++ 9 files changed, 82 insertions(+) create mode 100644 tests/multiIncremental/pr336147/base/src/City_Roo_Op4j.java create mode 100644 tests/multiIncremental/pr336147/inc1/src/Test.java create mode 100644 tests/multiIncremental/pr336147_2/base/src/City.java create mode 100644 tests/multiIncremental/pr336147_2/base/src/City_Roo_Op4j.java create mode 100644 tests/multiIncremental/pr336147_2/inc1/src/Test.java create mode 100644 tests/multiIncremental/pr336147_3/base/src/City.java create mode 100644 tests/multiIncremental/pr336147_3/base/src/City_Roo_Op4j.java create mode 100644 tests/multiIncremental/pr336147_3/base/src/Test.java diff --git a/tests/multiIncremental/pr336147/base/src/City_Roo_Op4j.java b/tests/multiIncremental/pr336147/base/src/City_Roo_Op4j.java new file mode 100644 index 000000000..b8a62e623 --- /dev/null +++ b/tests/multiIncremental/pr336147/base/src/City_Roo_Op4j.java @@ -0,0 +1,9 @@ + +privileged aspect City_Roo_Op4j { + public static class City.Keys { + public static final int x() { return 9; } + } +} + +class City { } + diff --git a/tests/multiIncremental/pr336147/inc1/src/Test.java b/tests/multiIncremental/pr336147/inc1/src/Test.java new file mode 100644 index 000000000..1d74dc7ae --- /dev/null +++ b/tests/multiIncremental/pr336147/inc1/src/Test.java @@ -0,0 +1,5 @@ +public class Test { + public static void main(String[] args) { + City.Keys.x(); + } +} diff --git a/tests/multiIncremental/pr336147_2/base/src/City.java b/tests/multiIncremental/pr336147_2/base/src/City.java new file mode 100644 index 000000000..0253a814f --- /dev/null +++ b/tests/multiIncremental/pr336147_2/base/src/City.java @@ -0,0 +1,3 @@ + +class City { } + diff --git a/tests/multiIncremental/pr336147_2/base/src/City_Roo_Op4j.java b/tests/multiIncremental/pr336147_2/base/src/City_Roo_Op4j.java new file mode 100644 index 000000000..7596715d0 --- /dev/null +++ b/tests/multiIncremental/pr336147_2/base/src/City_Roo_Op4j.java @@ -0,0 +1,7 @@ + +privileged aspect City_Roo_Op4j { + public static class City.Keys { + public static final int x() { return 9; } + } +} + diff --git a/tests/multiIncremental/pr336147_2/inc1/src/Test.java b/tests/multiIncremental/pr336147_2/inc1/src/Test.java new file mode 100644 index 000000000..1d74dc7ae --- /dev/null +++ b/tests/multiIncremental/pr336147_2/inc1/src/Test.java @@ -0,0 +1,5 @@ +public class Test { + public static void main(String[] args) { + City.Keys.x(); + } +} diff --git a/tests/multiIncremental/pr336147_3/base/src/City.java b/tests/multiIncremental/pr336147_3/base/src/City.java new file mode 100644 index 000000000..0253a814f --- /dev/null +++ b/tests/multiIncremental/pr336147_3/base/src/City.java @@ -0,0 +1,3 @@ + +class City { } + diff --git a/tests/multiIncremental/pr336147_3/base/src/City_Roo_Op4j.java b/tests/multiIncremental/pr336147_3/base/src/City_Roo_Op4j.java new file mode 100644 index 000000000..7596715d0 --- /dev/null +++ b/tests/multiIncremental/pr336147_3/base/src/City_Roo_Op4j.java @@ -0,0 +1,7 @@ + +privileged aspect City_Roo_Op4j { + public static class City.Keys { + public static final int x() { return 9; } + } +} + diff --git a/tests/multiIncremental/pr336147_3/base/src/Test.java b/tests/multiIncremental/pr336147_3/base/src/Test.java new file mode 100644 index 000000000..1d74dc7ae --- /dev/null +++ b/tests/multiIncremental/pr336147_3/base/src/Test.java @@ -0,0 +1,5 @@ +public class Test { + public static void main(String[] args) { + City.Keys.x(); + } +} diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/IncrementalCompilationTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/IncrementalCompilationTests.java index 247af6369..10fd73210 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/IncrementalCompilationTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/IncrementalCompilationTests.java @@ -83,6 +83,44 @@ public class IncrementalCompilationTests extends AbstractMultiProjectIncremental assertContains("B.java:4:0::0 Unhandled exception type IOException", getErrorMessages(p).get(0)); } + public void testITIT_336147() throws Exception { + String p = "pr336147"; + initialiseProject(p); + build(p); + checkWasFullBuild(); + assertNoErrors(p); + checkCompileWeaveCount(p, 1, 3); + alter(p, "inc1"); + build(p); + checkWasntFullBuild(); + assertNoErrors(p); + checkCompileWeaveCount(p, 1, 1); + } + + public void testITIT_336147_2() throws Exception { + String p = "pr336147_2"; + initialiseProject(p); + build(p); + checkWasFullBuild(); + assertNoErrors(p); + checkCompileWeaveCount(p, 2, 3); + alter(p, "inc1"); + build(p); + checkWasntFullBuild(); + assertNoErrors(p); + checkCompileWeaveCount(p, 1, 1); + } + + public void testITIT_336147_3() throws Exception { + AjdeInteractionTestbed.VERBOSE = true; + String p = "pr336147_3"; + initialiseProject(p); + build(p); + checkWasFullBuild(); + assertNoErrors(p); + checkCompileWeaveCount(p, 3, 4); + } + public void testDeclareFieldMinus() throws Exception { String p = "annoRemoval"; initialiseProject(p); -- 2.39.5