]> source.dussan.org Git - aspectj.git/commitdiff
static methods for unwrapping to keep internal structure knowledge local
authorwisberg <wisberg>
Thu, 14 Aug 2003 22:49:08 +0000 (22:49 +0000)
committerwisberg <wisberg>
Thu, 14 Aug 2003 22:49:08 +0000 (22:49 +0000)
testing/src/org/aspectj/testing/harness/bridge/AjcTest.java

index e67eb8b9e1920267977a1cf5055b69877a394ca9..7d4e970360df3367c6cdf638bf36f4a83260854b 100644 (file)
@@ -452,6 +452,20 @@ public class AjcTest extends RunSpecIterator {
      */
     public static class Suite extends RunSpecIterator {
         final Spec spec;
+        
+        /**
+         * Count the number of AjcTest in this suite.
+         * @param spec
+         * @return
+         */
+        public static int countTests(Suite.Spec spec) {
+            return spec.children.size();
+        }
+
+        public static AjcTest.Spec[] getTests(Suite.Spec spec) {
+            return (AjcTest.Spec[]) spec.children.toArray(new AjcTest.Spec[0]);
+        }
+
         public Suite(Spec spec, Sandbox sandbox, Validator validator) {
             super(spec, sandbox, validator, false);
             this.spec = spec;