stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: low hanging fruit while cleaning up test failures
Date Wed, 07 Nov 2007 22:26:05 GMT
Travis Vitek wrote:
> 
[...]
> 
> Just FYI, this is covered in STDCXX-608.
> 
> Yes, I agree. This appears to be a problem with the single-threaded tests
> only. All of The threaded tests that I looked at use only the first 16 or 32
> locales returned by rw_locales(). The threaded tests fail due to timeout
> also, but this is likely because the loop count is so very large [200000
> iterations per thread for some].
> 
> The rw_locales() method already seems to support filtering the locale list
> with `grep', so it appears that only the tests need to be modified.

Yeah, the grep filter is there but it doesn't work on Windows and
it's not quite portable.

I'd like to get rid of the "grep feature" and replace it with
something reliable. E.g., an interface that I could pass a set of
standard locale names (in the format of <language>_<COUNTRY>) and
or a set of encodings and have it pull up those that match not
using a lexicographical comparison but by intelligently mapping
the standard names to the native ones used on each platform).

That way I could call rw_locales() for example like so:

     rw_locales (0, 0, "UTF-8");

to give me the names of all locales encoded in UTF-8. Or maybe
like so:

     rw_locales (0, "de_CH en", 0);

to find all German locales for Switzerland in all encodings, and
also all English locales for all countries in any encoding. Etc.

Or something along those lines...

But I don't want us to have to hardcode different sets of locale
and codeset names for each platform in every set, and I don't
think that just taking the first N lines of locale -a output is
a good solution either.

Martin


Mime
View raw message