]> source.dussan.org Git - aspectj.git/commitdiff
inpath weaving test
authoraclement <aclement>
Thu, 31 Jul 2008 20:09:10 +0000 (20:09 +0000)
committeraclement <aclement>
Thu, 31 Jul 2008 20:09:10 +0000 (20:09 +0000)
tests/model/expected/prX.txt [new file with mode: 0644]
tests/model/prX/Code.class [new file with mode: 0644]
tests/model/prX/Code.java [new file with mode: 0644]
tests/model/prX/X.java [new file with mode: 0644]
tests/model/prX/inpath.jar [new file with mode: 0644]
tests/src/org/aspectj/systemtest/model/ModelTests.java
tests/src/org/aspectj/systemtest/model/model.xml

diff --git a/tests/model/expected/prX.txt b/tests/model/expected/prX.txt
new file mode 100644 (file)
index 0000000..b9190e6
--- /dev/null
@@ -0,0 +1,16 @@
+=== MODEL STATUS REPORT ========= After a batch build
+<root>  [java source file] 
+  X.java  [java source file] TEST_SANDBOX\X.java:1:
+    import declarations  [import reference] 
+    X  [aspect] TEST_SANDBOX\X.java:1:
+      before(): <anonymous pointcut>..  [advice] TEST_SANDBOX\X.java:2:
+=== END OF MODEL REPORT =========
+=== RELATIONSHIPS REPORT ========= After a batch build
+=== END OF RELATIONSHIPS REPORT ==
+=== Properties of the model and relationships map =====
+FileMapSize=1
+aspect=1
+advice=1
+RelationshipMapSize=0
+java source file=2
+import reference=1
diff --git a/tests/model/prX/Code.class b/tests/model/prX/Code.class
new file mode 100644 (file)
index 0000000..63e2cc5
Binary files /dev/null and b/tests/model/prX/Code.class differ
diff --git a/tests/model/prX/Code.java b/tests/model/prX/Code.java
new file mode 100644 (file)
index 0000000..e02c17e
--- /dev/null
@@ -0,0 +1,11 @@
+public class Code {
+  public static void main(String[]argv) {
+    new Code().foo();
+    new Code().moo();
+  }
+
+  void foo() {}
+
+  int i;
+  void moo() {}
+}
diff --git a/tests/model/prX/X.java b/tests/model/prX/X.java
new file mode 100644 (file)
index 0000000..753146e
--- /dev/null
@@ -0,0 +1,3 @@
+public aspect X {
+  before():execution(* *(..)) && !within(X) {}
+}
diff --git a/tests/model/prX/inpath.jar b/tests/model/prX/inpath.jar
new file mode 100644 (file)
index 0000000..cbefecd
Binary files /dev/null and b/tests/model/prX/inpath.jar differ
index 4978f1d5dcf5562cca9f52b31d92504ab12b51c8..d4f597bd36d02d15bf20bb86a52bafc12c53396f 100644 (file)
@@ -62,6 +62,8 @@ public class ModelTests extends ModelTestCase {
                }
        }
        
+//     public void testInpathAdvisedCode_prX() { runModelTest("inpath advised elements","prX"); }
+       
        public void testSourceLocationAndJarFile_pr145963() {runModelTest("sourcelocation and jar file","pr145963_1");}
        public void testSourceLocationAndClassFile_pr145963() {runModelTest("sourcelocation and class file","pr145963_2");}
        public void testAspectInDefaultPackage_pr145963() {runModelTest("aspect in default package", "pr145963_3");}
index ff406a99209bae747c4f6da3cced72319a26d3d0..c4ce0bcb1268d102422da84cc37e6557e801865c 100644 (file)
                        <message kind="warning" line="20" text="System.out should not be called"/>
          </compile>
     </ajc-test>
+    
+    <ajc-test dir="model/prX" title="inpath advised elements">
+      <compile files="X.java" inpath="inpath.jar" options="-1.5 -emacssym"/>
+    </ajc-test>
 
 
 </suite>