From 4add2e21b067b1e0ea1fb6e862d5c22429336c4a Mon Sep 17 00:00:00 2001 From: mwebster Date: Mon, 6 Nov 2006 13:49:03 +0000 Subject: [PATCH] Bug 155033 "Use ajcore for LTW problems" (move System Property handling) --- .../aspectj/testing/XMLBasedAjcTestCase.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java b/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java index b91587da7..dc9bbe296 100644 --- a/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java +++ b/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java @@ -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; + } + } } -- 2.39.5