Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Erich Gamma <egamma@us...> - 2002-03-30 22:37:44
|
Update of /cvsroot/junit/junit/junit/awtui In directory usw-pr-cvs1:/tmp/cvs-serv28016/junit/awtui Modified Files: TestRunner.java Removed Files: smalllogo.gif logo.gif Log Message: finished support for no-arg constructor. tweaks to the Swing UI Index: TestRunner.java =================================================================== RCS file: /cvsroot/junit/junit/junit/awtui/TestRunner.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- TestRunner.java 2 Nov 2001 01:37:53 -0000 1.8 +++ TestRunner.java 30 Mar 2002 22:37:41 -0000 1.9 @@ -1,14 +1,12 @@ package junit.awtui; -import junit.framework.*; -import junit.runner.*; - -import java.util.Vector; -import java.lang.reflect.*; import java.awt.*; import java.awt.event.*; -import java.awt.image.*; -import java.io.*; +import java.awt.image.ImageProducer; +import java.util.Vector; + +import junit.framework.*; +import junit.runner.*; /** * An AWT based user interface to run tests. @@ -342,12 +340,10 @@ return; } Test reloadedTest= null; + TestCase rerunTest= (TestCase)test; try { - Class reloadedTestClass= getLoader().reload(test.getClass()); - Class[] classArgs= { String.class }; - Constructor constructor= reloadedTestClass.getConstructor(classArgs); - Object[] args= new Object[]{((TestCase)test).getName()}; - reloadedTest= (Test)constructor.newInstance(args); + Class reloadedTestClass= getLoader().reload(test.getClass()); + reloadedTest= TestSuite.createTest(reloadedTestClass, rerunTest.getName()); } catch(Exception e) { showInfo("Could not reload "+ test.toString()); return; --- smalllogo.gif DELETED --- --- logo.gif DELETED --- |