harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <g...@pobox.com>
Subject Re: [classlib][swing] test code changes
Date Mon, 27 Nov 2006 13:26:54 GMT


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 module.
>> 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 to
> 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 remember
> there are several test cases which names ends in "...Tests.java" -- they
> should be renamed. I can provide a list, if necessary.

I also agree the pattern is fine as "**/*Test.java" but I still find the 
  above name misleading.

geir

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

Mime
View raw message