[RFC][icedtea-web][rhino] added tests for corner cases of dateRange and enabled testWeekdayRange
Jiri Vanek
jvanek at redhat.com
Tue Nov 8 05:30:34 PST 2011
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
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.
Also I have noticed, taht testWeekdayRange (in same test file) have missing runTests, so this test is never call. I adddd this call, and it's three tests are now in and passing
I had sorted call of this test *behind* "all currently running tests", because I want to keep rhino statistics (which are order-of-test dependent) untouched.
To test dateRange properly against specific dates, I had to modify also netx/net/sourceforge/jnlp/runtime/pac-funcs.js. I have moved logic of dateRange into new function isDateInRange which an be called against any date.
DateRange then preserve api compatibilty and is wrapper for "today" upon isDateInRange
Best regards
J.
changelog:
2011-11-08 Jiri Vanek <jvanek at redhat.com>
Added tests which covers corner cases or rhino support function dateRange
Enabled testWeekdayRange test
* tests/netx/pac/pac-funcs-test.js: (testWeekdayRange) - added mising
runTests call
(incDate) (decDate) (monthToStr) moved level up from function scope
to be shareable
(testDateRange2) new method, tests last days of months.
(testDateRange3) new method, tests first days of months
* netx/net/sourceforge/jnlp/runtime/pac-funcs.js:
(dateRange) logic of this method moved to isDateInRange. This one now serve
just as api using current date
(isDateInRange) logic of dateRange, can calculate ranges against any date
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RhinoDateRAngeCornerCasesTests.diff
Type: text/x-patch
Size: 7320 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20111108/4c6d514a/RhinoDateRAngeCornerCasesTests.diff
More information about the distro-pkg-dev
mailing list