aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorwisberg <wisberg>2005-06-09 00:00:17 +0000
committerwisberg <wisberg>2005-06-09 00:00:17 +0000
commit857d23c5bc0193156af04731262a800912240270 (patch)
treeab3f012ae879a5b950dd5aca48bf152a57a17eff /testing
parentcb13375e5c747a0d516afc1f2b29c5161e90d7be (diff)
downloadaspectj-857d23c5bc0193156af04731262a800912240270.tar.gz
aspectj-857d23c5bc0193156af04731262a800912240270.zip
new main for my convenience in testing the testing module
Diffstat (limited to 'testing')
-rw-r--r--testing/testsrc/org/aspectj/testing/util/LangUtilTest.java13
-rw-r--r--testing/testsrc/org/aspectj/testing/util/StreamGrabberTest.java13
2 files changed, 22 insertions, 4 deletions
diff --git a/testing/testsrc/org/aspectj/testing/util/LangUtilTest.java b/testing/testsrc/org/aspectj/testing/util/LangUtilTest.java
index 21e4b263d..6535a78be 100644
--- a/testing/testsrc/org/aspectj/testing/util/LangUtilTest.java
+++ b/testing/testsrc/org/aspectj/testing/util/LangUtilTest.java
@@ -21,6 +21,7 @@ import java.util.List;
import java.util.StringTokenizer;
import junit.framework.TestCase;
+import junit.framework.TestResult;
import junit.textui.TestRunner;
/**
@@ -33,8 +34,16 @@ public class LangUtilTest extends TestCase {
= "org.aspectj.testing.util.LangUtilTest";
/** @param args ignored */
- public static void main(String[] args) {
- TestRunner.main(new String[] {ME});
+ public static void main(String[] args) throws Exception {
+ class C extends TestRunner {
+ public TestResult go(String[] a) throws Exception {
+ return start(a);
+ }
+ }
+ TestResult r = new C().go(new String[] {ME});
+ if (!r.wasSuccessful()) {
+ System.err.println(r.errorCount() + "/" + r.failureCount());
+ }
}
/**
diff --git a/testing/testsrc/org/aspectj/testing/util/StreamGrabberTest.java b/testing/testsrc/org/aspectj/testing/util/StreamGrabberTest.java
index 9cd882fa8..9dc039e41 100644
--- a/testing/testsrc/org/aspectj/testing/util/StreamGrabberTest.java
+++ b/testing/testsrc/org/aspectj/testing/util/StreamGrabberTest.java
@@ -22,6 +22,7 @@ package org.aspectj.testing.util;
import java.io.PrintStream;
import junit.framework.TestCase;
+import junit.framework.TestResult;
import junit.textui.TestRunner;
/**
@@ -35,8 +36,16 @@ public class StreamGrabberTest extends TestCase {
= "org.aspectj.testing.util.StreamGrabberTest";
/** @param args ignored */
- public static void main(String[] args) {
- TestRunner.main(new String[] {ME});
+ public static void main(String[] args) throws Exception {
+ class C extends TestRunner {
+ public TestResult go(String[] a) throws Exception {
+ return start(a);
+ }
+ }
+ TestResult r = new C().go(args);
+ if (!r.wasSuccessful()) {
+ System.err.println(r.errorCount() + "/" + r.failureCount());
+ }
}
public StreamGrabberTest(String s) { super(s); }