incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <tvi...@quovadx.com>
Subject RE: [PATCH] Update test 22.locale.time.put.mt.cpp to validate results [take 2]
Date Mon, 13 Aug 2007 17:59:24 GMT
 

Travis Vitek wrote:
>
>Martin Sebor wrote:
>>
>>What do you think about this: let's change rw_locales() to always
>>return a list of names that starts with "C". That way callers that
>>don't want to exercise the "C" locale can simply skip past it while
>>others will be guaranteed to exercise the classic locale.
>>
>Sounds good. If we all agee, then I'll make up a patch for rw_locales()
>and for each of the tests that I added last week.
>
>I'm thinking that rw_locales should take a bool that indicates the "C"
>locale should be included at the head of the list. Ideally the default
>value would be true, but for compatibility it should be set to false.
>Hmmm. I'm thinking false and the tests that want the new 
>behavior can be
>updated later.
>
>I will also need to add support for a command line option to enable or
>disable this behavior. I'm thinking --use-c-locale=# or --no-c-locale#
>depending on what we decide for the default value mentioned above. Does
>that sound okay?

Ugh. What if the user provides both options --locales=en_US,es_MX and
--use-c-locale? Should we attempt to add the "C" locale to the user
supplied locale list, or should this only be something that is in effect
when the user doesn't use --locales?

The second option is weird, but it makes the most sense. The user could
easily just write --locales=en_US,es_MX,C if that is what they wanted.
In either case it looks like I might need to make a function in
test/rw_locale.h that provides some documentation and sets a flag that
is used by rw_locales().

>
>>Martin
>>
>>
>

Mime
View raw message