IMHO main() as well as suite() can be useful so I always left it in
the code. At least the last one.

Regards,

2006/11/28, Geir Magnusson Jr. <[EMAIL PROTECTED]>:
But that gets to be a pain - my thought is that unless it's harmful or
misleading, what's the problem with leaving it there?  And to belabor
the point, its polite to ask...

geir


Mikhail Loenko wrote:
> I usually do this. But I'm able to add main back when I need :)
> +1 for removing
>
> 2006/11/28, Nathan Beyer <[EMAIL PROTECTED]>:
>> To make the tests consistent with the majority (my observation) of the
>> other Harmony test cases without them.
>>
>> Besides that, from a pragmatic view, it's never used. The caveat to
>> that might be that lone hacker doing everything from the command-line
>> and invoking individual tests, if they have main methods, via a "java
>> ..." command.
>>
>> -Nathan
>>
>> On 11/28/06, Geir Magnusson Jr. <[EMAIL PROTECTED]> wrote:
>> > I'm game - why should the main() be removed?
>> >
>> > geir
>> >
>> > [EMAIL PROTECTED] wrote:
>> > > Author: ndbeyer
>> > > Date: Mon Nov 27 21:31:26 2006
>> > > New Revision: 479913
>> > >
>> > > URL: http://svn.apache.org/viewvc?view=rev&rev=479913
>> > > Log:
>> > > Remove unnecessary and empty methods
>> > >
>> > > Modified:
>> > >
>> 
harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo/AbstractUndoableEditTest.java
>>
>> > >
>> 
harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo/CannotRedoExceptionTest.java
>>
>> > >
>> 
harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo/CannotUndoExceptionTest.java
>>
>> > >
>> > > Modified:
>> 
harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo/AbstractUndoableEditTest.java
>>
>> > > URL:
>> 
http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo/AbstractUndoableEditTest.java?view=diff&rev=479913&r1=479912&r2=479913
>>
>> > >
>> 
==============================================================================
>>
>> > > ---
>> 
harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo/AbstractUndoableEditTest.java
>> (original)
>> > > +++
>> 
harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo/AbstractUndoableEditTest.java
>> Mon Nov 27 21:31:26 2006
>> > > @@ -35,10 +35,6 @@
>> > >
>> > >      private String defaultRedoName;
>> > >
>> > > -    public static void main(final String[] args) {
>> > > -        junit.textui.TestRunner.run(AbstractUndoableEditTest.class);
>> > > -    }
>> > > -
>> > >      @Override
>> > >      protected void setUp() throws Exception {
>> > >          obj = new AbstractUndoableEdit();
>> > >
>> > > Modified:
>> 
harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo/CannotRedoExceptionTest.java
>>
>> > > URL:
>> 
http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo/CannotRedoExceptionTest.java?view=diff&rev=479913&r1=479912&r2=479913
>>
>> > >
>> 
==============================================================================
>>
>> > > ---
>> 
harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo/CannotRedoExceptionTest.java
>> (original)
>> > > +++
>> 
harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo/CannotRedoExceptionTest.java
>> Mon Nov 27 21:31:26 2006
>> > > @@ -14,25 +14,12 @@
>> > >   *  See the License for the specific language governing
>> permissions and
>> > >   *  limitations under the License.
>> > >   */
>> > > -/**
>> > > - * @author Evgeniya G. Maenkova
>> > > - * @version $Revision$
>> > > - */
>> > > +
>> > >  package javax.swing.undo;
>> > >
>> > >  import junit.framework.TestCase;
>> > >
>> > >  public class CannotRedoExceptionTest extends TestCase {
>> > > -    @Override
>> > > -    protected void setUp() throws Exception {
>> > > -        super.setUp();
>> > > -    }
>> > > -
>> > > -    @Override
>> > > -    protected void tearDown() throws Exception {
>> > > -        super.tearDown();
>> > > -    }
>> > > -
>> > >      public void testCannotRedoException() {
>> > >          CannotRedoException exception = new CannotRedoException();
>> > >          assertNull(exception.getMessage());
>> > >
>> > > Modified:
>> 
harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo/CannotUndoExceptionTest.java
>>
>> > > URL:
>> 
http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo/CannotUndoExceptionTest.java?view=diff&rev=479913&r1=479912&r2=479913
>>
>> > >
>> 
==============================================================================
>>
>> > > ---
>> 
harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo/CannotUndoExceptionTest.java
>> (original)
>> > > +++
>> 
harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo/CannotUndoExceptionTest.java
>> Mon Nov 27 21:31:26 2006
>> > > @@ -14,25 +14,12 @@
>> > >   *  See the License for the specific language governing
>> permissions and
>> > >   *  limitations under the License.
>> > >   */
>> > > -/**
>> > > - * @author Evgeniya G. Maenkova
>> > > - * @version $Revision$
>> > > - */
>> > > +
>> > >  package javax.swing.undo;
>> > >
>> > >  import junit.framework.TestCase;
>> > >
>> > >  public class CannotUndoExceptionTest extends TestCase {
>> > > -    @Override
>> > > -    protected void setUp() throws Exception {
>> > > -        super.setUp();
>> > > -    }
>> > > -
>> > > -    @Override
>> > > -    protected void tearDown() throws Exception {
>> > > -        super.tearDown();
>> > > -    }
>> > > -
>> > >      public void testCannotRedoException() {
>> > >          CannotUndoException exception = new CannotUndoException();
>> > >          assertNull(exception.getMessage());



--
Alexei Zakharov,
Intel Enterprise Solutions Software Division

Reply via email to