CVS: junit/src/org/junit/runners AllTests.java, 1.2, 1.3

David Saff <[email protected]>
Newsgroups gmane.comp.java.junit.devel
Message-ID <[email protected]>
Update of /cvsroot/junit/junit/src/org/junit/runners
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv26251/src/org/junit/runners

Modified Files:
	AllTests.java 
Log Message:
Improving test coverage on OldTestClassRunner and AllTestsRunner

Index: AllTests.java
===================================================================
RCS file: /cvsroot/junit/junit/src/org/junit/runners/AllTests.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- AllTests.java	8 Feb 2007 03:29:22 -0000	1.2
+++ AllTests.java	21 Feb 2007 15:19:39 -0000	1.3
@@ -22,10 +22,10 @@
 public class AllTests extends OldTestClassRunner {
 	@SuppressWarnings("unchecked")
 	public AllTests(Class<?> klass) throws Throwable {
-		super(suite(klass));
+		super(testFromSuiteMethod(klass));
 	}
 
-	private static Test suite(Class<?> klass) throws Throwable {
+	public static Test testFromSuiteMethod(Class<?> klass) throws Throwable {
 		Method suiteMethod= null;
 		Test suite= null;
 		try {
@@ -34,7 +34,7 @@
 				throw new Exception(klass.getName() + ".suite() must be static");
 			}
 			suite= (Test) suiteMethod.invoke(null); // static method
-		} catch (InvocationTargetException e) { // TODO need coverage
+		} catch (InvocationTargetException e) {
 			throw e.getCause();
 		}
 		return suite;


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.