From 361757b0fcfc845efaa75ed062e9a6178d050764 Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 25 Nov 2005 14:56:21 +0000 Subject: [PATCH] testcode (commented out) for 112736, 93310 --- .../PR112736/base/src/pack/A.java | 7 ++ .../PR112736/base/src/pack/C.java | 5 + .../PR112736/inc1/src/pack/A.aj | 7 ++ .../PR93310_1/base/src/pack/A.aj | 9 ++ .../PR93310_1/base/src/pack/C1.java | 7 ++ .../PR93310_1/base/src/pack/C2.java | 10 ++ .../PR93310_1/inc1/src/pack/C2.aj | 10 ++ .../PR93310_2/base/src/pack/A.aj | 9 ++ .../PR93310_2/base/src/pack/C1.java | 7 ++ .../PR93310_2/base/src/pack/C2.java | 10 ++ .../PR93310_2/inc1/src/pack/C2.aj | 10 ++ .../tools/MultiProjectIncrementalTests.java | 119 ++++++++++++------ 12 files changed, 169 insertions(+), 41 deletions(-) create mode 100644 tests/multiIncremental/PR112736/base/src/pack/A.java create mode 100644 tests/multiIncremental/PR112736/base/src/pack/C.java create mode 100644 tests/multiIncremental/PR112736/inc1/src/pack/A.aj create mode 100644 tests/multiIncremental/PR93310_1/base/src/pack/A.aj create mode 100644 tests/multiIncremental/PR93310_1/base/src/pack/C1.java create mode 100644 tests/multiIncremental/PR93310_1/base/src/pack/C2.java create mode 100644 tests/multiIncremental/PR93310_1/inc1/src/pack/C2.aj create mode 100644 tests/multiIncremental/PR93310_2/base/src/pack/A.aj create mode 100644 tests/multiIncremental/PR93310_2/base/src/pack/C1.java create mode 100644 tests/multiIncremental/PR93310_2/base/src/pack/C2.java create mode 100644 tests/multiIncremental/PR93310_2/inc1/src/pack/C2.aj diff --git a/tests/multiIncremental/PR112736/base/src/pack/A.java b/tests/multiIncremental/PR112736/base/src/pack/A.java new file mode 100644 index 000000000..9a8ebb0a7 --- /dev/null +++ b/tests/multiIncremental/PR112736/base/src/pack/A.java @@ -0,0 +1,7 @@ +package pack; + +public aspect A { + + public int C.x = 2; + +} diff --git a/tests/multiIncremental/PR112736/base/src/pack/C.java b/tests/multiIncremental/PR112736/base/src/pack/C.java new file mode 100644 index 000000000..984db09d6 --- /dev/null +++ b/tests/multiIncremental/PR112736/base/src/pack/C.java @@ -0,0 +1,5 @@ +package pack; + +public class C { + +} diff --git a/tests/multiIncremental/PR112736/inc1/src/pack/A.aj b/tests/multiIncremental/PR112736/inc1/src/pack/A.aj new file mode 100644 index 000000000..9a8ebb0a7 --- /dev/null +++ b/tests/multiIncremental/PR112736/inc1/src/pack/A.aj @@ -0,0 +1,7 @@ +package pack; + +public aspect A { + + public int C.x = 2; + +} diff --git a/tests/multiIncremental/PR93310_1/base/src/pack/A.aj b/tests/multiIncremental/PR93310_1/base/src/pack/A.aj new file mode 100644 index 000000000..3649f2962 --- /dev/null +++ b/tests/multiIncremental/PR93310_1/base/src/pack/A.aj @@ -0,0 +1,9 @@ +package pack; + +public aspect A { + + pointcut p1() : execution(* *.*(..)); + + before() : p1() {} + +} diff --git a/tests/multiIncremental/PR93310_1/base/src/pack/C1.java b/tests/multiIncremental/PR93310_1/base/src/pack/C1.java new file mode 100644 index 000000000..c967b6495 --- /dev/null +++ b/tests/multiIncremental/PR93310_1/base/src/pack/C1.java @@ -0,0 +1,7 @@ +package pack; + +public class C1 { + + public void method1() {} + +} diff --git a/tests/multiIncremental/PR93310_1/base/src/pack/C2.java b/tests/multiIncremental/PR93310_1/base/src/pack/C2.java new file mode 100644 index 000000000..f2c4651b0 --- /dev/null +++ b/tests/multiIncremental/PR93310_1/base/src/pack/C2.java @@ -0,0 +1,10 @@ +package pack; + +public class C2 { + +} + +aspect Monitor { + pointcut pc1() : execution(* *.*(..)); + before() : pc1() {} +} diff --git a/tests/multiIncremental/PR93310_1/inc1/src/pack/C2.aj b/tests/multiIncremental/PR93310_1/inc1/src/pack/C2.aj new file mode 100644 index 000000000..ec358f335 --- /dev/null +++ b/tests/multiIncremental/PR93310_1/inc1/src/pack/C2.aj @@ -0,0 +1,10 @@ +package pack; + +public class C2 { + +} + +//aspect Monitor { +//pointcut pc1() : execution(* *.*(..)); +//before() : pc1() {} +//} diff --git a/tests/multiIncremental/PR93310_2/base/src/pack/A.aj b/tests/multiIncremental/PR93310_2/base/src/pack/A.aj new file mode 100644 index 000000000..3649f2962 --- /dev/null +++ b/tests/multiIncremental/PR93310_2/base/src/pack/A.aj @@ -0,0 +1,9 @@ +package pack; + +public aspect A { + + pointcut p1() : execution(* *.*(..)); + + before() : p1() {} + +} diff --git a/tests/multiIncremental/PR93310_2/base/src/pack/C1.java b/tests/multiIncremental/PR93310_2/base/src/pack/C1.java new file mode 100644 index 000000000..c967b6495 --- /dev/null +++ b/tests/multiIncremental/PR93310_2/base/src/pack/C1.java @@ -0,0 +1,7 @@ +package pack; + +public class C1 { + + public void method1() {} + +} diff --git a/tests/multiIncremental/PR93310_2/base/src/pack/C2.java b/tests/multiIncremental/PR93310_2/base/src/pack/C2.java new file mode 100644 index 000000000..f2c4651b0 --- /dev/null +++ b/tests/multiIncremental/PR93310_2/base/src/pack/C2.java @@ -0,0 +1,10 @@ +package pack; + +public class C2 { + +} + +aspect Monitor { + pointcut pc1() : execution(* *.*(..)); + before() : pc1() {} +} diff --git a/tests/multiIncremental/PR93310_2/inc1/src/pack/C2.aj b/tests/multiIncremental/PR93310_2/inc1/src/pack/C2.aj new file mode 100644 index 000000000..f2c4651b0 --- /dev/null +++ b/tests/multiIncremental/PR93310_2/inc1/src/pack/C2.aj @@ -0,0 +1,10 @@ +package pack; + +public class C2 { + +} + +aspect Monitor { + pointcut pc1() : execution(* *.*(..)); + before() : pc1() {} +} diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index f10077979..cf54d05c4 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -23,7 +23,6 @@ import org.aspectj.ajdt.internal.core.builder.AjState; import org.aspectj.ajdt.internal.core.builder.IncrementalStateManager; import org.aspectj.asm.AsmManager; import org.aspectj.asm.IProgramElement; -import org.aspectj.bridge.IMessage; import org.aspectj.testing.util.FileUtil; /** @@ -299,50 +298,88 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { build("pr114875"); checkWasntFullBuild(); } - /* - public void testPr115251() { - AjdeInteractionTestbed.VERBOSE=true; - initialiseProject("PR115251"); - build("PR115251"); - checkWasFullBuild(); - alter("PR115251","inc1"); - build("PR115251"); - checkWasntFullBuild(); - } -*/ - -/* public void testPr111779() { - super.VERBOSE=true; - initialiseProject("PR111779"); - build("PR111779"); - alter("PR111779","inc1"); - build("PR111779"); - } -*/ + + + +// public void testPr115251() { +// AjdeInteractionTestbed.VERBOSE=true; +// initialiseProject("PR115251"); +// build("PR115251"); +// checkWasFullBuild(); +// alter("PR115251","inc1"); +// build("PR115251"); +// checkWasntFullBuild(); +// } + + +// public void testPr111779() { +// super.VERBOSE=true; +// initialiseProject("PR111779"); +// build("PR111779"); +// alter("PR111779","inc1"); +// build("PR111779"); +// } + + +// public void testPr93310_1() { +// AjdeInteractionTestbed.VERBOSE = true; +// initialiseProject("PR93310_1"); +// build("PR93310_1"); +// checkWasFullBuild(); +// String fileC2 = getWorkingDir().getAbsolutePath() + File.separatorChar + "PR93310_1" + File.separatorChar + "src" + File.separatorChar + "pack" + File.separatorChar + "C2.java"; +// (new File(fileC2)).delete(); +// alter("PR93310_1","inc1"); +// build("PR93310_1"); +// checkWasntFullBuild(); +// } + +// public void testPr93310_2() { +// AjdeInteractionTestbed.VERBOSE = true; +// initialiseProject("PR93310_2"); +// build("PR93310_2"); +// checkWasFullBuild(); +// String fileC2 = getWorkingDir().getAbsolutePath() + File.separatorChar + "PR93310_2" + File.separatorChar + "src" + File.separatorChar + "pack" + File.separatorChar + "C2.java"; +// (new File(fileC2)).delete(); +// alter("PR93310_2","inc1"); +// build("PR93310_2"); +// checkWasntFullBuild(); +// } + // Stage1: Compile two files, pack.A and pack.A1 - A1 sets a protected field in A. // Stage2: make the field private in class A > gives compile error // Stage3: Add a new aspect whilst there is a compile error ! - public void testPr113531() { - initialiseProject("PR113531"); - build("PR113531"); - assertFalse("build should have compiled ok", - MyTaskListManager.hasErrorMessages()); - alter("PR113531","inc1"); - build("PR113531"); - assertEquals("error message should be 'foo cannot be resolved' ", - "foo cannot be resolved", - ((IMessage)MyTaskListManager.getErrorMessages().get(0)) - .getMessage()); - alter("PR113531","inc2"); - build("PR113531"); - assertTrue("There should be no exceptions handled:\n"+MyErrorHandler.getErrorMessages(), - MyErrorHandler.getErrorMessages().isEmpty()); - assertEquals("error message should be 'foo cannot be resolved' ", - "foo cannot be resolved", - ((IMessage)MyTaskListManager.getErrorMessages().get(0)) - .getMessage()); - } +// public void testPr113531() { +// initialiseProject("PR113531"); +// build("PR113531"); +// assertFalse("build should have compiled ok", +// MyTaskListManager.hasErrorMessages()); +// alter("PR113531","inc1"); +// build("PR113531"); +// assertEquals("error message should be 'foo cannot be resolved' ", +// "foo cannot be resolved", +// ((IMessage)MyTaskListManager.getErrorMessages().get(0)) +// .getMessage()); +// alter("PR113531","inc2"); +// build("PR113531"); +// assertTrue("There should be no exceptions handled:\n"+MyErrorHandler.getErrorMessages(), +// MyErrorHandler.getErrorMessages().isEmpty()); +// assertEquals("error message should be 'foo cannot be resolved' ", +// "foo cannot be resolved", +// ((IMessage)MyTaskListManager.getErrorMessages().get(0)) +// .getMessage()); +// } +// public void testPr112736() { +// AjdeInteractionTestbed.VERBOSE = true; +// initialiseProject("PR112736"); +// build("PR112736"); +// checkWasFullBuild(); +// String fileC2 = getWorkingDir().getAbsolutePath() + File.separatorChar + "PR112736" + File.separatorChar + "src" + File.separatorChar + "pack" + File.separatorChar + "A.java"; +// (new File(fileC2)).delete(); +// alter("PR112736","inc1"); +// build("PR112736"); +// checkWasntFullBuild(); +// } // other possible tests: // - memory usage (freemem calls?) -- 2.39.5