incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Liviu Nicoara <>
Subject Re: STDCXX-970 and locale tests
Date Sat, 06 Oct 2012 20:54:55 GMT
On 10/01/12 11:06, Martin Sebor wrote:
> On 10/01/2012 06:57 AM, Liviu Nicoara wrote:
>> Also, I see that the localization tests do not make use of input files,
>> unlike the older Rogue Wave tests. Is that a policy going forward that
>> the tests do not make use of external input files?
> The tests hardcode locale values in order to guarantee consistent
> results, even if the external locale databases change. There also
> is a makefile target that builds all the stdcxx locales. That's
> just to exercise the locale utility programs. I think there also
> should be a test that uses localedef to build a subset of these
> locales, runs the locale utility to dump the contents of the built
> database, and then localedef again to rebuild the database. Then
> it compares the result of the first and second build (or it may
> do three stages to normalize things) to make sure they match.

I have dusted the 22.locale.collate.cpp test file, removing old 
workarounds, and tests for which we don't have the input anymore.

The important finding of this exercise is that the test fails in the 
collation of wide strings with embedded NUL's. The wide facet 
specialization uses wcscoll, if available, but does not take into 
account embedded NULs, like the narrow specialization does.

I am attaching the full test and the diff (which is quite hard to read). 
As is, the test has got a mere facelift with no substantive improvements.


View raw message