[RFC][icedtea-web][rhino] added tests for corner cases of dateRange and enabled testWeekdayRange

Omair Majid omajid at redhat.com
Tue Jun 5 07:01:22 PDT 2012


On 06/05/2012 09:10 AM, Jiri Vanek wrote:
> On 05/28/2012 09:10 PM, Omair Majid wrote:
>> On 05/23/2012 08:00 AM, Jiri Vanek wrote:
>>> On 05/22/2012 07:48 PM, Omair Majid wrote:
>>>> On 11/10/2011 06:12 AM, Jiri Vanek wrote:
>>>>> Attached is patch with fixed indentation
>>>>
>>>> Well, turns out that this isn't quite true :(
>>>>
>>>>> -    // note: watch out for wrapping around of dates. date ranges,
>>>>> like
>>>>> -    // month=9 to month=8, wrap around and cover the entire year.
>>>>> this
>>>>> -    // makes everything more interesting
>>>>> +    function isDateInRange() {
>>>>
>>>> I completely missed that this makes isDateInRange a top-level function.
>>>> I intentionally wanted to avoid this; this script now exposes this
>>>> (unexpected) function to all the proxy auto config scripts. I can
>>>> imagine all sorts of name clashes if a script accidentally defines a
>>>> function with the same name. Can we fix this somehow while still
>>>> keeping
>>>> the testing benefits?
>>>
>>> Well javascript private-members is painful theme. Just google around and
>>> you will get scared. What just about to rename it?
>>> I will need some nasty refactoring and prototyping which have its
>>> disadvantages.
>>>
>>> isDateInRange ->  diuaseOUIUHroigjodHPffg484gfjfg ? :)
>>>
>>> or better
>>> isDateInRange ->  isDateInRange_internallForIcedTeaWebTesting ?
>>
>> There are no guarantees that these wont clash either, especially if
>> someone is trying to make that happen :(
>>
>> Still, it's better than what we have now. So go for it!
>>
>> Omair
> here we are

Thanks for the patch. Looks fine to me.

Perhaps you can even alias isDateInRange to
isDateInRange_internallForIcedTeaWebTesting and have fewer changes?
Anyway, it's fine as it is if you want to go ahead with it.

> 2012-06-05  Jiri Vanek  <jvanek at redhat.com>
> 
>     * netx/net/sourceforge/jnlp/runtime/pac-funcs.js: and
>     * tests/netx/pac/pac-funcs-test.js: isDateInRange renamed to
>     isDateInRange_internallForIcedTeaWebTesting

Please list both function names in full. Somethign like this works for me:
(isDateInRange): Renamed to isDateInRange_internallForIcedTeaWebTesting.
(isDateInRange_internallForIcedTeaWebTesting): New function.

You can see some more rename examples at:
http://www.opensource.apple.com/source/emacs/emacs-50/emacs/lisp/ChangeLog.8?txt

Cheers,
Omair



More information about the distro-pkg-dev mailing list