]> source.dussan.org Git - aspectj.git/commitdiff
Bug 155033 "Use ajcore for LTW problems" (move System Property handling)
authormwebster <mwebster>
Mon, 6 Nov 2006 13:49:03 +0000 (13:49 +0000)
committermwebster <mwebster>
Mon, 6 Nov 2006 13:49:03 +0000 (13:49 +0000)
testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java

index b91587da73e40aa46ef26b18d03f6e3d4baf31f3..dc9bbe296853ece4b9a69b349916bb56732c8483 100644 (file)
@@ -13,6 +13,7 @@ package org.aspectj.testing;
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FilenameFilter;
 import java.io.InputStreamReader;
 import java.util.HashMap;
 import java.util.Map;
@@ -275,5 +276,24 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase {
                File f = new File(ajc.getSandboxDirectory(),file);
                assertTrue("File " + file + " should have been updated",f.lastModified() > sinceTime);
          }
+
+         public static class CountingFilenameFilter implements FilenameFilter {
+               
+                 private String suffix;
+                 private int count;
+                 
+                 public CountingFilenameFilter (String s) {
+                         this.suffix = s;
+                 }
+               
+                 public boolean accept(File dir, String name) {
+                         if (name.endsWith(suffix)) count++;
+                         return false;
+                 }
+       
+                 public int getCount() {
+                         return count;
+                 }
+         }
 }