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

Omair Majid omajid at redhat.com
Thu Nov 10 06:58:31 PST 2011


On 11/10/2011 06:12 AM, Jiri Vanek wrote:
> On 11/09/2011 06:22 PM, Omair Majid wrote:
>> On 11/08/2011 08:30 AM, Jiri Vanek wrote:
>>> Hi!
>>> This tests pickup and covers rhino tests failures, which occurs at the
>>> start/end of each week.
>>> eg bottoms of:
>>> http://10.34.2.200/icedtea-web-dailyreport/ICWDR_1320037429/index.html
>>> http://10.34.2.200/icedtea-web-dailyreport/ICWDR_1320123820/index.html
>>> http://10.34.2.200/icedtea-web-dailyreport/ICWDR_1320210219/index.html
>>> and see regeressions in Rhino tests
>>>
>>
>> Thanks for these. Some of the links, like 'Rhino tests' which leads to
>> http://10.34.2.200/icedtea-web-dailyreport/ICWDR_1320037429/ICWDR_1320037429/check_o.log,
>> look broken.
> Yap, I',m aware of this. Those links are used in three levels.. In this
> deepest one they are not fixed, (because I'm lazy) because the logs
> themselves are available in the logs list at the top.
>>
>>> More then bug in netx itself, I suspect quite strange functions incDate
>>> and decDate in tests/netx/pac/pac-funcs-test.js
>>> Note, that new tests of first day in month are falling all, and tests of
>>> last day in month are falling only for 31 days long months.
>>>
>>
>> Just to be clear, the patch does not change this behaviour, right?
>
> True. Most of new tests (all except X.30) are falling. The fix will
> probably lay inside incDate/decDate. I will fix them when this patch
> will be in. Probably the best way is to use Date javascript
> functionality setDate
> var date=new Date();
>
> function incDate(d){
> var date2=new Date();
> date2.setDate(d.getDate()+30);
> return date2;
> }
> function f1()
> {
> document.writeln(" 1 "+date.toLocaleDateString());
> document.writeln(" 2 "+incDate(date));
> document.writeln(" 3 "+date.toLocaleDateString());
> }
>
> will output
> 1 11/10/2011
> 2 Sat Dec 10 2011 12:06:47 GMT+0100 (CET)
> 3 11/10/2011
> which is correct.
>
> So this should do the work but will need quite a typing in tests.
>>
>> I suspect you might have to replace incDate/decDate (and related
>> methods) to increment the date, month, year tuple (and return that)
>> instead of just the date or the month or the year by itself.
> ...
>>
>> Good idea.
>>
>>> diff -r 89b7a28ccafb netx/net/sourceforge/jnlp/runtime/pac-funcs.js
> ...to much indentation problems ...
>>>
>>
>> The tests themselves look fine to me.
>>
>> Thanks again for catching this and creating a patch!
>>
> Attached is patch with fixed indentation
>

Looks good to me.

Cheers,
Omair




More information about the distro-pkg-dev mailing list