]> source.dussan.org Git - aspectj.git/commitdiff
testcode (commented out) for 112736, 93310
authoraclement <aclement>
Fri, 25 Nov 2005 14:56:21 +0000 (14:56 +0000)
committeraclement <aclement>
Fri, 25 Nov 2005 14:56:21 +0000 (14:56 +0000)
12 files changed:
tests/multiIncremental/PR112736/base/src/pack/A.java [new file with mode: 0644]
tests/multiIncremental/PR112736/base/src/pack/C.java [new file with mode: 0644]
tests/multiIncremental/PR112736/inc1/src/pack/A.aj [new file with mode: 0644]
tests/multiIncremental/PR93310_1/base/src/pack/A.aj [new file with mode: 0644]
tests/multiIncremental/PR93310_1/base/src/pack/C1.java [new file with mode: 0644]
tests/multiIncremental/PR93310_1/base/src/pack/C2.java [new file with mode: 0644]
tests/multiIncremental/PR93310_1/inc1/src/pack/C2.aj [new file with mode: 0644]
tests/multiIncremental/PR93310_2/base/src/pack/A.aj [new file with mode: 0644]
tests/multiIncremental/PR93310_2/base/src/pack/C1.java [new file with mode: 0644]
tests/multiIncremental/PR93310_2/base/src/pack/C2.java [new file with mode: 0644]
tests/multiIncremental/PR93310_2/inc1/src/pack/C2.aj [new file with mode: 0644]
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java

diff --git a/tests/multiIncremental/PR112736/base/src/pack/A.java b/tests/multiIncremental/PR112736/base/src/pack/A.java
new file mode 100644 (file)
index 0000000..9a8ebb0
--- /dev/null
@@ -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 (file)
index 0000000..984db09
--- /dev/null
@@ -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 (file)
index 0000000..9a8ebb0
--- /dev/null
@@ -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 (file)
index 0000000..3649f29
--- /dev/null
@@ -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 (file)
index 0000000..c967b64
--- /dev/null
@@ -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 (file)
index 0000000..f2c4651
--- /dev/null
@@ -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 (file)
index 0000000..ec358f3
--- /dev/null
@@ -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 (file)
index 0000000..3649f29
--- /dev/null
@@ -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 (file)
index 0000000..c967b64
--- /dev/null
@@ -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 (file)
index 0000000..f2c4651
--- /dev/null
@@ -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 (file)
index 0000000..f2c4651
--- /dev/null
@@ -0,0 +1,10 @@
+package pack;
+
+public class C2 {
+       
+}
+
+aspect Monitor {
+       pointcut pc1() : execution(* *.*(..));
+    before() : pc1() {}
+}
index f1007797918600ac917f2c1a1bf9b9d109fbe2a1..cf54d05c4b37edf4768450c689d07a10aa0e2f32 100644 (file)
@@ -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?)