FYI: SanityCheck for DateFormatSymbols

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

FYI: SanityCheck for DateFormatSymbols

I've been looking into a number of issues with the DateFormatSymbols
locale data; see

As part of this, I'm adding a test to Mauve which checks each locale's
symbols to make sure:

1.  The array is the right size.
2.  All elements are not null.
3.  All elements are not empty, unless allowed (weekday[0] and month[12]).

With gcj 4.6.2, we have 783 failures out of 29216 tests.  With the patch
I'm about to post to GNU Classpath applied, this reduces to 235 out of
30456 (the test increase is due to some arrays now being their correct
larger size, such as de_AT mentioned in the bug).

For reference, OpenJDK has 0 failures out of 14288 tests (they have
much less locale data).  I should be able to get our failure rate down
further by fixing further bugs in the locale data.  The generator is
currently picking up the wrong incomplete set of month & week names
for locales like be and cy.

2012-01-12  Andrew John Hughes  <[hidden email]>

        * gnu/testlet/java/text/DateFormatSymbols/
        Extend test to also check array content for null/empty values.
        (checkArray(TestHarness, Locale, String, String[], int)):
        Helper method for checking locale data.  Runs harness checks
        to ensure the array is the right size and has all non-null
        non-empty values (except where empty values are allowed
        for weekday[0] and month[12]).

Andrew :)

Free Java Software Engineer
Red Hat, Inc. (

PGP Key: 248BDC07 (
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07

diff (3K) Download Attachment
signature.asc (853 bytes) Download Attachment