[swift-corelibs-dev] Strange behavior the same code fails when building a Cocoa CLI and succeeds in Swift-corelibs-foundation context.

Benoit Pereira da silva bpds at me.com
Mon Dec 18 12:02:55 CST 2017

>> But i do think that it triggers a serious question:  Should all your tests be ran on all the available locales? 
>> You will certainly find a smarter solution …
> I think it is sensible to iterate through a key list of known locales that have certain characteristics, such as using the , as a decimal separator or « for quote begin etc (not to pick on French but it is the one I know better than other punctuation differentials from English).
> There are probably key areas that are worth doing this to and others that probably do not matter so much. e.g. you don’t really need to test locale variations with NotificationCenter for example whereas NumberFormatter or JSONSerialization may be places that we want to test a few locales by subclassing the unit tests and in setup change the locale and teardown reset it.


Being subtile is not always the best approach. 
Are we really able to determinate where such a problem may occur?  Should we even try? 
I’m not  sure !

Smarts approaches may lead to enabling a root account with a blank password. 
Running tests on any locale on every commit is absurd. 

But running it before a major release, may enable to detect blind spots.


More information about the swift-corelibs-dev mailing list