]> source.dussan.org Git - aspectj.git/commitdiff
binary handles testcase - commented out
authoraclement <aclement>
Thu, 18 Sep 2008 17:31:17 +0000 (17:31 +0000)
committeraclement <aclement>
Thu, 18 Sep 2008 17:31:17 +0000 (17:31 +0000)
tests/bugs162/IntoBinary/Asp.java [new file with mode: 0644]
tests/bugs162/IntoBinary/Clazz.java [new file with mode: 0644]
tests/bugs162/IntoBinary/binaryaspect.jar [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java
tests/src/org/aspectj/systemtest/ajc162/ajc162.xml

diff --git a/tests/bugs162/IntoBinary/Asp.java b/tests/bugs162/IntoBinary/Asp.java
new file mode 100644 (file)
index 0000000..8614a51
--- /dev/null
@@ -0,0 +1,3 @@
+public aspect Asp {
+  before(): execution(* foo(..)) {}
+}
diff --git a/tests/bugs162/IntoBinary/Clazz.java b/tests/bugs162/IntoBinary/Clazz.java
new file mode 100644 (file)
index 0000000..4de725d
--- /dev/null
@@ -0,0 +1,3 @@
+public class Clazz {
+  public void foo() {}
+}
diff --git a/tests/bugs162/IntoBinary/binaryaspect.jar b/tests/bugs162/IntoBinary/binaryaspect.jar
new file mode 100644 (file)
index 0000000..6580ec8
Binary files /dev/null and b/tests/bugs162/IntoBinary/binaryaspect.jar differ
index 0085ffe990f006733974a82209528bf35b8880a5..268e2224f318f2fa9d0154fd0f8b893c00db9656 100644 (file)
 package org.aspectj.systemtest.ajc162;
 
 import java.io.File;
+import java.io.PrintWriter;
 
 import junit.framework.Test;
 
+import org.aspectj.asm.AsmManager;
 import org.aspectj.testing.XMLBasedAjcTestCase;
 
 public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
        // AspectJ1.6.2
+
+       // When faulting in the binary hierarchy:
+       // <root> [java source file]
+       // Clazz.java [java source file] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\Clazz.java:1::0
+       // import declarations [import reference]
+       // Clazz [class] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\Clazz.java:1::13
+       // foo() [method] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\Clazz.java:2::36
+       // Asp.class (binary) [class] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\binaryaspect.jar!Asp.class:1::0
+       // import declarations [import reference]
+       // Asp [aspect] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\binaryaspect.jar!Asp.class:1::0
+       // before(): <anonymous pointcut> [advice] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\binaryaspect.jar!Asp.class:2::0
+       // Hid:1:(targets=1) [Asp.class (binary)}Asp&before (advises) {Clazz.java[Clazz~foo
+       // Hid:2:(targets=1) {Clazz.java[Clazz~foo (advised by) [Asp.class (binary)}Asp&before
+
+       // without faulting in the model they stop at the top level (the class level)
+
+       // Hid:1:(targets=1) "{Clazz.java[Clazz~foo" (advised by) "{Asp.class"
+       // Hid:2:(targets=1) "{Asp.class" (advises) "{Clazz.java[Clazz~foo"
+
+       // what I want for the hid is:
+
+       // <somethingIndicatingBinary>"[Asp.class}Asp&before"
+/*
+       public void testBinaryAspectModeling() throws Exception {
+               runTest("binary aspects model");
+               AsmManager.dumptree(AsmManager.getDefault().getHierarchy().getRoot(), 0);
+               PrintWriter pw = new PrintWriter(System.out);
+               AsmManager.getDefault().dumprels(pw);
+               pw.flush();
+       }
+*/
        public void testPerClause() {
                runTest("ltw perclause");
        }
index f096322b23ebe96d76294af88c27293ef9d75153..c1054ee34380e72eaef5747312520e32df2eb5c7 100644 (file)
@@ -3,6 +3,10 @@
 <!-- AspectJ v1.6.2 Tests -->
 <suite>
        
+   <ajc-test dir="bugs162/IntoBinary" title="binary aspects model">
+     <compile options="-1.5 -emacssym" files="Clazz.java" aspectpath="binaryaspect.jar"/>
+   </ajc-test>
+   
    <ajc-test dir="bugs162/pr246918" title="ltw perclause">
      <compile options="-1.5" files="Code.java Dode.java" outjar="code.jar"/>
      <compile options="-1.5 -Xlint:ignore" files="Base.java" outjar="aspects.jar"/>