You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by "Geir Magnusson Jr." <ge...@pobox.com> on 2006/11/28 07:15:55 UTC
Re: svn commit: r479913 - in /harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo:
AbstractUndoableEditTest.java CannotRedoExceptionTest.java CannotUndoExceptionTest.java
I'm game - why should the main() be removed?
geir
ndbeyer@apache.org 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());
>
>
Re: svn commit: r479913 - in /harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo: AbstractUndoableEditTest.java CannotRedoExceptionTest.java CannotUndoExceptionTest.java
Posted by Alexei Zakharov <al...@gmail.com>.
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. <ge...@pobox.com>:
> 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 <nb...@gmail.com>:
> >> 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. <ge...@pobox.com> wrote:
> >> > I'm game - why should the main() be removed?
> >> >
> >> > geir
> >> >
> >> > ndbeyer@apache.org 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
Re: svn commit: r479913 - in /harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo:
AbstractUndoableEditTest.java CannotRedoExceptionTest.java CannotUndoExceptionTest.java
Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
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 <nb...@gmail.com>:
>> 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. <ge...@pobox.com> wrote:
>> > I'm game - why should the main() be removed?
>> >
>> > geir
>> >
>> > ndbeyer@apache.org 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());
>> > >
>> > >
>> >
>>
Re: svn commit: r479913 - in /harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo: AbstractUndoableEditTest.java CannotRedoExceptionTest.java CannotUndoExceptionTest.java
Posted by Mikhail Loenko <ml...@gmail.com>.
I usually do this. But I'm able to add main back when I need :)
+1 for removing
2006/11/28, Nathan Beyer <nb...@gmail.com>:
> 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. <ge...@pobox.com> wrote:
> > I'm game - why should the main() be removed?
> >
> > geir
> >
> > ndbeyer@apache.org 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());
> > >
> > >
> >
>
Re: svn commit: r479913 - in /harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo:
AbstractUndoableEditTest.java CannotRedoExceptionTest.java CannotUndoExceptionTest.java
Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
I think that for things like that, you should ask first.
geir
Nathan Beyer wrote:
> 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. <ge...@pobox.com> wrote:
>> I'm game - why should the main() be removed?
>>
>> geir
>>
>> ndbeyer@apache.org 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());
>> >
>> >
>>
Re: svn commit: r479913 - in /harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/undo: AbstractUndoableEditTest.java CannotRedoExceptionTest.java CannotUndoExceptionTest.java
Posted by Nathan Beyer <nb...@gmail.com>.
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. <ge...@pobox.com> wrote:
> I'm game - why should the main() be removed?
>
> geir
>
> ndbeyer@apache.org 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());
> >
> >
>