]> source.dussan.org Git - aspectj.git/commitdiff
145963: work on linux
authoraclement <aclement>
Mon, 21 Aug 2006 12:34:46 +0000 (12:34 +0000)
committeraclement <aclement>
Mon, 21 Aug 2006 12:34:46 +0000 (12:34 +0000)
tests/model/expected/pr145963_1.txt
tests/model/expected/pr145963_2.txt
tests/model/expected/pr145963_3.txt
tests/model/expected/pr145963_4.txt
tests/src/org/aspectj/systemtest/model/ModelTestCase.java

index 3a0f42f14326b4dd2bd835d73dfdd33a335d6341..5e2067ec28b2d3883657e8aff72af184ee59574f 100644 (file)
@@ -1,24 +1,24 @@
 === MODEL STATUS REPORT ========= After a batch build
 <root>  [java source file] 
   pkg  [package] 
-    SourceAspect.aj  [java source file] TEST_SANDBOX\SourceAspect.aj:1::0
+    SourceAspect.aj  [java source file] TEST_SANDBOX\SourceAspect.aj:1:
       import declarations  [import reference] 
-      SourceAspect  [aspect] TEST_SANDBOX\SourceAspect.aj:3::30
-        declare warning: "There should be n.."  [declare warning] TEST_SANDBOX\SourceAspect.aj:5::49
-        p()  [pointcut] TEST_SANDBOX\SourceAspect.aj:7::154
-        before(): p..  [advice] TEST_SANDBOX\SourceAspect.aj:9::187
-    BinaryAspect.class (binary)  [class] TEST_SANDBOX\simple.jar!pkg\BinaryAspect.class:1::0
+      SourceAspect  [aspect] TEST_SANDBOX\SourceAspect.aj:3:
+        declare warning: "There should be n.."  [declare warning] TEST_SANDBOX\SourceAspect.aj:5:
+        p()  [pointcut] TEST_SANDBOX\SourceAspect.aj:7:
+        before(): p..  [advice] TEST_SANDBOX\SourceAspect.aj:9:
+    BinaryAspect.class (binary)  [class] TEST_SANDBOX\simple.jar!pkg\BinaryAspect.class:1:
       import declarations  [import reference] 
-      BinaryAspect  [aspect] TEST_SANDBOX\simple.jar!pkg\BinaryAspect.class:1::0
-        p()  [pointcut] TEST_SANDBOX\simple.jar!pkg\BinaryAspect.class:7::0
-        before(): p..  [advice] TEST_SANDBOX\simple.jar!pkg\BinaryAspect.class:9::0
-        declare warning: "There should be n.."  [declare warning] TEST_SANDBOX\simple.jar!pkg\BinaryAspect.class:5::0
+      BinaryAspect  [aspect] TEST_SANDBOX\simple.jar!pkg\BinaryAspect.class:1:
+        p()  [pointcut] TEST_SANDBOX\simple.jar!pkg\BinaryAspect.class:7:
+        before(): p..  [advice] TEST_SANDBOX\simple.jar!pkg\BinaryAspect.class:9:
+        declare warning: "There should be n.."  [declare warning] TEST_SANDBOX\simple.jar!pkg\BinaryAspect.class:5:
   pack  [package] 
-    C.java  [java source file] TEST_SANDBOX\C.java:1::0
+    C.java  [java source file] TEST_SANDBOX\C.java:1:
       import declarations  [import reference] 
-      C  [class] TEST_SANDBOX\C.java:3::30
-        method1()  [method] TEST_SANDBOX\C.java:5::50
-          field-get(java.io.PrintStream java.lang.System.out)  [code] TEST_SANDBOX\C.java:6::93
+      C  [class] TEST_SANDBOX\C.java:3:
+        method1()  [method] TEST_SANDBOX\C.java:5:
+          field-get(java.io.PrintStream java.lang.System.out)  [code] TEST_SANDBOX\C.java:6:
 === END OF MODEL REPORT =========
 === RELATIONSHIPS REPORT ========= After a batch build
 (targets=1) <pkg[BinaryAspect.class (binary)}BinaryAspect&before (advises) <pack{C.java[C~method1
index 576724c4c649c6d35d404607c9821ca8a4a5c9e3..7c996f7c52837e6de8cc7ac6e144b9c86759ac8e 100644 (file)
@@ -1,24 +1,24 @@
 === MODEL STATUS REPORT ========= After a batch build
 <root>  [java source file] 
   pkg  [package] 
-    SourceAspect.aj  [java source file] TEST_SANDBOX\SourceAspect.aj:1::0
+    SourceAspect.aj  [java source file] TEST_SANDBOX\SourceAspect.aj:1:
       import declarations  [import reference] 
-      SourceAspect  [aspect] TEST_SANDBOX\SourceAspect.aj:3::30
-        declare warning: "There should be n.."  [declare warning] TEST_SANDBOX\SourceAspect.aj:5::49
-        p()  [pointcut] TEST_SANDBOX\SourceAspect.aj:7::154
-        before(): p..  [advice] TEST_SANDBOX\SourceAspect.aj:9::187
-    BinaryAspect.class (binary)  [class] TEST_SANDBOX!pkg\BinaryAspect.class:1::0
+      SourceAspect  [aspect] TEST_SANDBOX\SourceAspect.aj:3:
+        declare warning: "There should be n.."  [declare warning] TEST_SANDBOX\SourceAspect.aj:5:
+        p()  [pointcut] TEST_SANDBOX\SourceAspect.aj:7:
+        before(): p..  [advice] TEST_SANDBOX\SourceAspect.aj:9:
+    BinaryAspect.class (binary)  [class] TEST_SANDBOX!pkg\BinaryAspect.class:1:
       import declarations  [import reference] 
-      BinaryAspect  [aspect] TEST_SANDBOX!pkg\BinaryAspect.class:1::0
-        p()  [pointcut] TEST_SANDBOX!pkg\BinaryAspect.class:7::0
-        before(): p..  [advice] TEST_SANDBOX!pkg\BinaryAspect.class:9::0
-        declare warning: "There should be n.."  [declare warning] TEST_SANDBOX!pkg\BinaryAspect.class:5::0
+      BinaryAspect  [aspect] TEST_SANDBOX!pkg\BinaryAspect.class:1:
+        p()  [pointcut] TEST_SANDBOX!pkg\BinaryAspect.class:7:
+        before(): p..  [advice] TEST_SANDBOX!pkg\BinaryAspect.class:9:
+        declare warning: "There should be n.."  [declare warning] TEST_SANDBOX!pkg\BinaryAspect.class:5:
   pack  [package] 
-    C.java  [java source file] TEST_SANDBOX\C.java:1::0
+    C.java  [java source file] TEST_SANDBOX\C.java:1:
       import declarations  [import reference] 
-      C  [class] TEST_SANDBOX\C.java:3::30
-        method1()  [method] TEST_SANDBOX\C.java:5::50
-          field-get(java.io.PrintStream java.lang.System.out)  [code] TEST_SANDBOX\C.java:6::93
+      C  [class] TEST_SANDBOX\C.java:3:
+        method1()  [method] TEST_SANDBOX\C.java:5:
+          field-get(java.io.PrintStream java.lang.System.out)  [code] TEST_SANDBOX\C.java:6:
 === END OF MODEL REPORT =========
 === RELATIONSHIPS REPORT ========= After a batch build
 (targets=1) <pkg[BinaryAspect.class (binary)}BinaryAspect&before (advises) <pack{C.java[C~method1
index d278a4ddf903e29481e0a391ad516befeb35c6e7..e3cff1bbfdbb10fc7a7b9892a01f9cbb0d551511 100644 (file)
@@ -1,14 +1,14 @@
 === MODEL STATUS REPORT ========= After a batch build
 <root>  [java source file] 
-  C.java  [java source file] TEST_SANDBOX\C.java:1::0
+  C.java  [java source file] TEST_SANDBOX\C.java:1:
     import declarations  [import reference] 
-    C  [class] TEST_SANDBOX\C.java:3::17
-      method1()  [method] TEST_SANDBOX\C.java:5::37
-        field-get(java.io.PrintStream java.lang.System.out)  [code] TEST_SANDBOX\C.java:6::80
-  AspectInDefaultPackage.class (binary)  [class] TEST_SANDBOX\simple.jar!AspectInDefaultPackage.class:1::0
+    C  [class] TEST_SANDBOX\C.java:3:
+      method1()  [method] TEST_SANDBOX\C.java:5:
+        field-get(java.io.PrintStream java.lang.System.out)  [code] TEST_SANDBOX\C.java:6:
+  AspectInDefaultPackage.class (binary)  [class] TEST_SANDBOX\simple.jar!AspectInDefaultPackage.class:1:
     import declarations  [import reference] 
-    AspectInDefaultPackage  [aspect] TEST_SANDBOX\simple.jar!AspectInDefaultPackage.class:1::0
-      declare warning: "There should be n.."  [declare warning] TEST_SANDBOX\simple.jar!AspectInDefaultPackage.class:4::0
+    AspectInDefaultPackage  [aspect] TEST_SANDBOX\simple.jar!AspectInDefaultPackage.class:1:
+      declare warning: "There should be n.."  [declare warning] TEST_SANDBOX\simple.jar!AspectInDefaultPackage.class:4:
 === END OF MODEL REPORT =========
 === RELATIONSHIPS REPORT ========= After a batch build
 (targets=1) {C.java[C~method1?field-get(java.io.PrintStream java.lang.System.out) (matches declare) [AspectInDefaultPackage.class (binary)}AspectInDefaultPackage`declare warning
index 08924e13f0f8607f136c355fa91640beb0b7660e..04a5873e614a925d54f3b91cb9ad783c6295b158 100644 (file)
@@ -1,15 +1,15 @@
 === MODEL STATUS REPORT ========= After a batch build
 <root>  [java source file] 
   pack  [package] 
-    C.java  [java source file] TEST_SANDBOX\C.java:1::0
+    C.java  [java source file] TEST_SANDBOX\C.java:1:
       import declarations  [import reference] 
-      C  [class] TEST_SANDBOX\C.java:3::30
-        method1()  [method] TEST_SANDBOX\C.java:5::50
-          field-get(java.io.PrintStream java.lang.System.out)  [code] TEST_SANDBOX\C.java:6::93
-  A.class (binary)  [class] TEST_SANDBOX\simple.jar!A.class:1::0
+      C  [class] TEST_SANDBOX\C.java:3:
+        method1()  [method] TEST_SANDBOX\C.java:5:
+          field-get(java.io.PrintStream java.lang.System.out)  [code] TEST_SANDBOX\C.java:6:
+  A.class (binary)  [class] TEST_SANDBOX\simple.jar!A.class:1:
     import declarations  [import reference] 
-    A  [aspect] TEST_SANDBOX\simple.jar!A.class:1::0
-      declare warning: "There should be n.."  [declare warning] TEST_SANDBOX\simple.jar!A.class:4::0
+    A  [aspect] TEST_SANDBOX\simple.jar!A.class:1:
+      declare warning: "There should be n.."  [declare warning] TEST_SANDBOX\simple.jar!A.class:4:
 === END OF MODEL REPORT =========
 === RELATIONSHIPS REPORT ========= After a batch build
 (targets=1) <pack{C.java[C~method1?field-get(java.io.PrintStream java.lang.System.out) (matches declare) [A.class (binary)}A`declare warning
index 37f873839c0e7c69106342fbc39346524a3afdae..6f39ebdecdfdf9f73184c3c4faf065aebd7f1755 100644 (file)
@@ -76,7 +76,21 @@ public abstract class ModelTestCase extends XMLBasedAjcTestCase {
                }
 
                public String processFilelocation(String loc) {
-                       if (loc.startsWith(sandboxDirectory)) return "TEST_SANDBOX"+loc.substring(sandboxDirectory.length());
+                       if (loc.toLowerCase().startsWith(sandboxDirectory.toLowerCase())) {
+                               String sub = loc.substring(sandboxDirectory.length());
+                               int forwardSlash = sub.indexOf("/");
+                               // replace all "/" with "\" - to ensure platform independence
+                               if (forwardSlash != -1) {
+                                       sub = sub.replace('/','\\');
+                               }
+                               // don't report the column number since this is sometimes
+                               // different on windows and linux
+                               int column = sub.lastIndexOf(':');
+                               if (column != -1) {
+                                       return "TEST_SANDBOX" + sub.substring(0,column);
+                               }
+                               return "TEST_SANDBOX"+sub;
+                       }
                        return loc;
                }