[PATCH] D26979: Do not hard-code locale data in unit tests: get it from the OS instead

2016-11-22 Thread Eric van Gyzen via cfe-commits
vangyzen created this revision. vangyzen added a subscriber: cfe-commits. Herald added a subscriber: emaste. Locale data can vary across platforms. Rather than hard-code the expected data in the units tests, get it from the OS via the C API. This fixes these unit tests on FreeBSD. It might fix

[PATCH] D26979: Do not hard-code locale data in unit tests: get it from the OS instead

2016-11-22 Thread Eric van Gyzen via cfe-commits
vangyzen added inline comments. Comment at: test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp:50 +} std::locale l(LOCALE_en_US_UTF_8); { EricWF wrote: > I think we should reset the glob

[PATCH] D26979: Do not hard-code locale data in unit tests: get it from the OS instead

2016-11-22 Thread Eric van Gyzen via cfe-commits
vangyzen updated this revision to Diff 78919. vangyzen added a comment. Fix comment vim + Caps Lock == :( https://reviews.llvm.org/D26979 Files: test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp test/std/localization/locale.categories/facet.n

[PATCH] D26979: Do not hard-code locale data in unit tests: get it from the OS instead

2016-11-22 Thread Eric van Gyzen via cfe-commits
vangyzen updated this revision to Diff 78916. vangyzen added a comment. Reset the global locale so it's different than the one we pass to std::locale l(...). That way we're testing that we don't accidentally use the global locale. https://reviews.llvm.org/D26979 Files: test/std/localization

[PATCH] D26979: Do not hard-code locale data in unit tests: get it from the OS instead

2016-11-22 Thread Eric van Gyzen via cfe-commits
vangyzen updated this revision to Diff 78921. vangyzen added a comment. Remove XFAIL on linux-gnu These tests now pass on Fedora 24. https://reviews.llvm.org/D26979 Files: test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp test/std/localizatio

[PATCH] D26979: Do not hard-code locale data in unit tests: get it from the OS instead

2016-11-22 Thread Eric van Gyzen via cfe-commits
vangyzen added a comment. @EricWF, would you like to see anything more from me? I could set up an LLVM development environment on my Mac if you want me to run the unit tests on Mac. https://reviews.llvm.org/D26979 ___ cfe-commits mailing list cfe-

[PATCH] D26920: Add validation to Stage 2 of num_get

2016-11-22 Thread Eric van Gyzen via cfe-commits
vangyzen added a comment. On Fedora 24, all std/localization test results are as expected. On FreeBSD 11, all std/.../category.numeric tests pass, and there are no additional unexpected results under std/localization. While I'm on that topic: Under std/localization, the number of unexpected f

[PATCH] D26979: Do not hard-code locale data in unit tests: get it from the OS instead

2016-11-23 Thread Eric van Gyzen via cfe-commits
vangyzen added a comment. In https://reviews.llvm.org/D26979#604013, @EricWF wrote: > Nope. Feel free to commit after adding the requested assertions. I would gladly commit it, but I don't have commit access. I'm quite new here. Comment at: test/std/localization/locale.cat

[PATCH] D26979: Do not hard-code locale data in unit tests: get it from the OS instead

2016-11-23 Thread Eric van Gyzen via cfe-commits
vangyzen added inline comments. Comment at: test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp:65 +{ +expected = *std::localeconv()->thousands_sep; +(void) std::setlocale(LC_NUMERIC, "C");

Request for review/commit

2016-11-30 Thread Eric van Gyzen via cfe-commits
I recently posted a few libc++ patches in Phabricator. I'm fairly new here, so I would be grateful if someone would review and eventually commit them. [libc++] Add validation to Stage 2 of num_get https://reviews.llvm.org/D26920 [libc++] Do not hard-code locale data in unit tests: get it from th