]> source.dussan.org Git - aspectj.git/commitdiff
286341: incremental anno style
authoraclement <aclement>
Sat, 5 Sep 2009 01:46:06 +0000 (01:46 +0000)
committeraclement <aclement>
Sat, 5 Sep 2009 01:46:06 +0000 (01:46 +0000)
tests/multiIncremental/pr286341/base/src/Two.java [new file with mode: 0644]
tests/multiIncremental/pr286341/inc1/src/Two.java [new file with mode: 0644]
tests/multiIncremental/pr286341_base/base/src/Behavior.java [new file with mode: 0644]
tests/multiIncremental/pr286341_base/base/src/Wibble.aj [new file with mode: 0644]
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java

diff --git a/tests/multiIncremental/pr286341/base/src/Two.java b/tests/multiIncremental/pr286341/base/src/Two.java
new file mode 100644 (file)
index 0000000..4ee04d2
--- /dev/null
@@ -0,0 +1,7 @@
+
+
+class Two {
+       public static void main(String[] args) {
+               new Behavior().m(); 
+       }  
+}
diff --git a/tests/multiIncremental/pr286341/inc1/src/Two.java b/tests/multiIncremental/pr286341/inc1/src/Two.java
new file mode 100644 (file)
index 0000000..4ee04d2
--- /dev/null
@@ -0,0 +1,7 @@
+
+
+class Two {
+       public static void main(String[] args) {
+               new Behavior().m(); 
+       }  
+}
diff --git a/tests/multiIncremental/pr286341_base/base/src/Behavior.java b/tests/multiIncremental/pr286341_base/base/src/Behavior.java
new file mode 100644 (file)
index 0000000..f4af4a7
--- /dev/null
@@ -0,0 +1,15 @@
+public class Behavior {
+
+       public static void main(String[] args) {
+               new Behavior().m();
+       }
+
+       public void m() {
+               int i;
+       }
+
+       public void m2() {
+               int i;
+       }
+}
+
diff --git a/tests/multiIncremental/pr286341_base/base/src/Wibble.aj b/tests/multiIncremental/pr286341_base/base/src/Wibble.aj
new file mode 100644 (file)
index 0000000..d1bf2fc
--- /dev/null
@@ -0,0 +1,21 @@
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+
+@Aspect
+class Wibble {
+
+       @Pointcut("if() && call(public * m*(..)) && target(b)")
+       public static boolean adviseIfMonitoring(Behavior b) {
+           return true;
+       }
+
+       
+       @Around("adviseIfMonitoring(b)")
+       public Object monitorBehaviorPerformance(ProceedingJoinPoint pjp, Behavior b)
+       throws Throwable {
+           return pjp.proceed();
+       }
+}
+
index 5d2430edaf1bed8dcafeca65c5f92db18919b6fd..b964830ff61f976816dbcc06a4202e410ddd76ea 100644 (file)
@@ -53,6 +53,30 @@ import org.aspectj.util.FileUtil;
  */
 public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementalAjdeInteractionTestbed {
 
+       /*
+public void testIncrementalAspectWhitespace() throws Exception {
+               AjdeInteractionTestbed.VERBOSE = true;
+               String p = "xxx";
+               initialiseProject(p);
+               configureNonStandardCompileOptions(p, "-showWeaveInfo");
+               configureShowWeaveInfoMessages(p, true);
+               build(p);
+
+               List weaveMessages = getWeavingMessages(p);
+               if (weaveMessages.size() != 0) {
+                       for (Iterator iterator = weaveMessages.iterator(); iterator.hasNext();) {
+                               Object object = iterator.next();
+                               System.out.println(object);
+                       }
+               }
+               checkWasFullBuild();
+               assertNoErrors(p);
+               alter(p, "inc1");
+               build(p);
+               checkWasntFullBuild();
+               assertNoErrors(p);
+       }*/
+
        public void testIncrementalGenericItds_pr280676() throws Exception {
                String p = "pr280676";
                initialiseProject(p);
@@ -762,8 +786,26 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                assertEquals("Unexpected compiler error", 0, l.size());
        }
 
-       public void testImports_pr263487() {
+       public void testIncrementalAnnoStyle_pr286341() {
                AjdeInteractionTestbed.VERBOSE = true;
+               String base = "pr286341_base";
+               initialiseProject(base);
+               build(base);
+               checkWasFullBuild();
+               String p = "pr286341";
+               initialiseProject(p);
+               configureAspectPath(p, getProjectRelativePath(base, "bin"));
+               addClasspathEntry(p, getProjectRelativePath(base, "bin"));
+               build(p);
+               checkWasFullBuild();
+               assertNoErrors(p);
+               alter(p, "inc1");
+               build(p);
+               checkWasntFullBuild();
+               assertNoErrors(p);
+       }
+
+       public void testImports_pr263487() {
                String p2 = "importProb2";
                initialiseProject(p2);
                build(p2);