harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivanov, Alexey A" <alexey.a.iva...@intel.com>
Subject RE: [classlib][swing] test code changes
Date Mon, 27 Nov 2006 13:43:48 GMT
>-----Original Message-----
>From: Geir Magnusson Jr. [mailto:geir@pobox.com]
>Sent: Monday, November 27, 2006 4:27 PM
>To: dev@harmony.apache.org
>Subject: Re: [classlib][swing] test code changes
>Ivanov, Alexey A wrote:
>>> -----Original Message-----
>>> From: Nathan Beyer [mailto:nbeyer@gmail.com]
>>> Sent: Monday, November 27, 2006 4:04 AM
>>> To: dev@harmony.apache.org; geir@pobox.com
>>> Subject: Re: [classlib][swing] test code changes
>>> On 11/26/06, Geir Magnusson Jr. <geir@pobox.com> wrote:
>>>> Nathan Beyer wrote:
>>>>> I made some changes to the swing module's test bits at revision
>> 479469
>>>>> and wanted to pass it by the mailing list.
>>>>> I copied the "javax.swing.SwingTestCase" and
>>>>> "javax.swing.BaseSwingTestCase" classes from 'support' to the
>> 'swing'
>>>>> module. I recall a previous discussion about this, but let me know
>> if
>>>>> this isn't good. I'll delete the classes from 'support' later.
>>>>> To get this to work, I also updated the build.xml in 'swing'.
>> Instead
>>>>> of running all tests that match "**/*Test*.java", I changed it to
>>>>> match "**/*Test.java" so that these two classes wouldn't be picked
>> up.
>>>> Why wouldn't you simply rename them?
>>> We could, but just so everyone knows, combined these two classes are
>>> used as the base class of essentially every test in the swing
>>> Also, I'm not sure what would be a better name, as these abstract
>>> classes extend TestCase and add "swing" features.
>> They shouldn't be renamed because these classes have no tests -- they
>> are just support classes which provide additional methods, features
>> support Swing testing. And SwingTestCase ensures setUp(), tearDown(),
>> and test methods are executed on Event Dispatch Thread. (Swing is not
>> thread-safe!)
>> Because these classes have no tests, they are marked abstract so that
>> they can't be instantiated directly.
>if they have no tests, please don't name them "TestCase".  Maybe
>"TestSupport" or something.
>> I am for keeping the pattern "**/*Test.java". But as far as I
>> there are several test cases which names ends in "...Tests.java" --
>> should be renamed. I can provide a list, if necessary.
>I also agree the pattern is fine as "**/*Test.java" but I still find
>  above name misleading.

Why? JUnit has TestCase class which serves the base for all the test
classes. These two classes enhance JUnit's TestCase with Swing-related
features. I think keeping 'TestCase' is reasonable here.

I don't mind renaming them though, if everybody considers 'TestCase' as
a confusing name.


>> Thank you, Nathan.
>> Regards,
>> Alexey.
>>> -Nathan
>>>> geir
>>>>> -Nathan
>> --
>> Alexey A. Ivanov
>> Intel Enterprise Solutions Software Division

Alexey A. Ivanov
Intel Enterprise Solutions Software Division

View raw message