]> source.dussan.org Git - aspectj.git/commitdiff
268611: building broken deca code (fix)
authoraclement <aclement>
Mon, 16 Mar 2009 19:53:38 +0000 (19:53 +0000)
committeraclement <aclement>
Mon, 16 Mar 2009 19:53:38 +0000 (19:53 +0000)
tests/multiIncremental/pr268611/base/src/b/Advises.aj [new file with mode: 0644]
tests/multiIncremental/pr268611/base/src/b/IsAdvised.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java

diff --git a/tests/multiIncremental/pr268611/base/src/b/Advises.aj b/tests/multiIncremental/pr268611/base/src/b/Advises.aj
new file mode 100644 (file)
index 0000000..150be42
--- /dev/null
@@ -0,0 +1,8 @@
+package b;
+
+public aspect Advises {
+
+    declare @type: IsAdvised : @Deprecated;
+    declare @method : IsAdvised.doNothing() : @Deprecated;
+    declare @field : int IsAdvised.x : @Deprecated;
+}
diff --git a/tests/multiIncremental/pr268611/base/src/b/IsAdvised.java b/tests/multiIncremental/pr268611/base/src/b/IsAdvised.java
new file mode 100644 (file)
index 0000000..31e838a
--- /dev/null
@@ -0,0 +1,8 @@
+package b;
+
+
+public class IsAdvised {
+
+    public void doNothing() {} 
+    int x;
+}
index 9dc0ea6b5c5a75ed4863890a700dacef07ca24f7..354c742e6cc9f1b27787e9a94be3b633676807dd 100644 (file)
@@ -34,6 +34,7 @@ import org.aspectj.asm.IRelationshipMap;
 import org.aspectj.asm.internal.ProgramElement;
 import org.aspectj.asm.internal.Relationship;
 import org.aspectj.bridge.IMessage;
+import org.aspectj.bridge.Message;
 import org.aspectj.tools.ajc.Ajc;
 import org.aspectj.util.FileUtil;
 
@@ -50,6 +51,16 @@ import org.aspectj.util.FileUtil;
  */
 public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementalAjdeInteractionTestbed {
 
+       public void testBrokenCodeDeca_268611() {
+               String p = "pr268611";
+               initialiseProject(p);
+               build(p);
+               checkWasFullBuild();
+               assertEquals(1, getErrorMessages(p).size());
+               assertTrue(((Message) getErrorMessages(p).get(0)).getMessage().indexOf(
+                               "Syntax error on token \")\", \"name pattern\" expected") != -1);
+       }
+
        public void testIncrementalMixin() {
                String p = "mixin";
                initialiseProject(p);