From 444960d934b528b00f3d7959aa43b4477cf1f1ae Mon Sep 17 00:00:00 2001 From: aclement Date: Sat, 5 Sep 2009 01:46:06 +0000 Subject: [PATCH] 286341: incremental anno style --- .../pr286341/base/src/Two.java | 7 +++ .../pr286341/inc1/src/Two.java | 7 +++ .../pr286341_base/base/src/Behavior.java | 15 +++++++ .../pr286341_base/base/src/Wibble.aj | 21 +++++++++ .../tools/MultiProjectIncrementalTests.java | 44 ++++++++++++++++++- 5 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 tests/multiIncremental/pr286341/base/src/Two.java create mode 100644 tests/multiIncremental/pr286341/inc1/src/Two.java create mode 100644 tests/multiIncremental/pr286341_base/base/src/Behavior.java create mode 100644 tests/multiIncremental/pr286341_base/base/src/Wibble.aj diff --git a/tests/multiIncremental/pr286341/base/src/Two.java b/tests/multiIncremental/pr286341/base/src/Two.java new file mode 100644 index 000000000..4ee04d21a --- /dev/null +++ b/tests/multiIncremental/pr286341/base/src/Two.java @@ -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 index 000000000..4ee04d21a --- /dev/null +++ b/tests/multiIncremental/pr286341/inc1/src/Two.java @@ -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 index 000000000..f4af4a76c --- /dev/null +++ b/tests/multiIncremental/pr286341_base/base/src/Behavior.java @@ -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 index 000000000..d1bf2fc3d --- /dev/null +++ b/tests/multiIncremental/pr286341_base/base/src/Wibble.aj @@ -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(); + } +} + diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index 5d2430eda..b964830ff 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -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); -- 2.39.5