>-----Original Message-----
>From: Alexey Varlamov [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, October 17, 2006 4:41 PM
>To: harmony-dev@incubator.apache.org
>Subject: Re: [classlib][swing] test "hangs":
>j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:
>
>2006/10/17, Ivanov, Alexey A <[EMAIL PROTECTED]>:
>> Hello everyone,
>>
>> When running tests on Windows,
>> FileSystemViewTest.testGetSystemDisplayName() pops up a dialog
prompting
>> to insert disk into drive A:. This dialog prevents normal running of
>> other tests.
>>
>
>LOL
>
>> IMO, the problem assertion could be deleted without loss of coverage.
>> Any other comments/opinions?
>>
>> See the JIRA issue:
https://issues.apache.org/jira/browse/HARMONY-1892
>>
>>
>> Regards,
>> Alexey.
>>
>>
>> P.S. The problem code is at lines 85-86 in FileSystemViewTest.java:
>>        file = File.listRoots()[0];
>>        assertNotSame(file.getName(),
view.getSystemDisplayName(file));
>
>The assertion doesn't look foolproof anyway. Accordingly to spec
>getSystemDisplayName() should return *some* name, max what we may
>assert that it is not null and not empty.

It's supposed to do what you pointed out.
Actually here it merely asserts file.getName() !=
view.getSystemDisplayName(file), which is likely to be true even if
file.getName().equals(view.getSystemDisplayName(file)). Most likely the
author wanted the following assertion:
assertFalse(file.getName().equals(view.getSystemDisplayName(file)))


file.getName() returns "" both on Windows and Linux. And
view.getSystemDisplayName(file) returns "3.5 Floppy (A:)" on Windows and
"/" on Linux.


Regards,
Alexey.

>
>>
>> --
>> Alexey A. Ivanov
>> Intel Middleware Product Division
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail:
[EMAIL PROTECTED]
>>
>>
>
>---------------------------------------------------------------------
>Terms of use : http://incubator.apache.org/harmony/mailing.html
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

--
Alexey A. Ivanov
Intel Middleware Product Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to