[PATCH] D25811: [libcxx] Fix toupper/tolower tests for UTF-8 locale
kparzysz abandoned this revision. kparzysz added a comment. In https://reviews.llvm.org/D25811#632670, @EricWF wrote: > While I was attempting to review this patch I ended up coming up with fixed > tests myself. I committed them in r290746. I'm very sorry to step on your > toes. No problem at all. Thanks for the fixes! Repository: rL LLVM https://reviews.llvm.org/D25811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D25811: [libcxx] Fix toupper/tolower tests for UTF-8 locale
EricWF added a comment. In https://reviews.llvm.org/D25811#586053, @kparzysz wrote: > In https://reviews.llvm.org/D25811#586000, @arphaman wrote: > > > I've tested this patch on OS X and these 4 tests that you've changed now > > fail. > > > > The `XFAIL: with_system_cxx_lib` lines don't have any effect on my system - > > these tests get invoked as expected by lit. Let me know if there's anything > > else I can do to help you. > > > That's surprising. "XFAIL: with_system_lib=..." are used for testing against OS X's installed libc++, which is very rarely done. @arphaman is probably testing against the in-tree libc++ on OS X, which is why the XFAIL's have no effect. > Seems like something is different on OS X. The reason for the different output on Linux and OS X is that they each provide their own different locale data. In particular they provide different toupper/tolower conversion tables. For some reason the ones on OS X seem to support UTF-16 conversions as well. Currently GLIBC doesn't even support UTF-8 multi-byte characters. While I was attempting to review this patch I ended up coming up with fixed tests myself. I committed them in r290746. I'm very sorry to step on your toes. However there are plenty more `//XFAIL: linux` localization tests to fix! Repository: rL LLVM https://reviews.llvm.org/D25811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D25811: [libcxx] Fix toupper/tolower tests for UTF-8 locale
arphaman added a comment. In https://reviews.llvm.org/D25811#586053, @kparzysz wrote: > In https://reviews.llvm.org/D25811#586000, @arphaman wrote: > > > I've tested this patch on OS X and these 4 tests that you've changed now > > fail. > > > > The `XFAIL: with_system_cxx_lib` lines don't have any effect on my system - > > these tests get invoked as expected by lit. Let me know if there's anything > > else I can do to help you. > > > That's surprising. Seems like something is different on OS X. > Could you try compiling/running this small program? > > #include > #include > > int main() { > std::locale x("en_US.UTF-8"); > std::cout << x.name() << std::endl; > } > > > If it prints "en_US.UTF-8", then I'm out of ideas... :) Just tried it, I get "en_US.UTF-8" Repository: rL LLVM https://reviews.llvm.org/D25811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D25811: [libcxx] Fix toupper/tolower tests for UTF-8 locale
kparzysz added a comment. And thanks for help. :) Repository: rL LLVM https://reviews.llvm.org/D25811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D25811: [libcxx] Fix toupper/tolower tests for UTF-8 locale
kparzysz added a comment. In https://reviews.llvm.org/D25811#586000, @arphaman wrote: > I've tested this patch on OS X and these 4 tests that you've changed now fail. > > The `XFAIL: with_system_cxx_lib` lines don't have any effect on my system - > these tests get invoked as expected by lit. Let me know if there's anything > else I can do to help you. That's surprising. Seems like something is different on OS X. Could you try compiling/running this small program? #include #include int main() { std::locale x("en_US.UTF-8"); std::cout << x.name() << std::endl; } If it prints "en_US.UTF-8", then I'm out of ideas... :) Repository: rL LLVM https://reviews.llvm.org/D25811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D25811: [libcxx] Fix toupper/tolower tests for UTF-8 locale
arphaman added a comment. I've tested this patch on OS X and these 4 tests that you've changed now fail. The `XFAIL: with_system_cxx_lib` lines don't have any effect on my system - these tests get invoked as expected by lit. Let me know if there's anything else I can do to help you. Repository: rL LLVM https://reviews.llvm.org/D25811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D25811: [libcxx] Fix toupper/tolower tests for UTF-8 locale
kparzysz updated this revision to Diff 75292. kparzysz added a comment. Unxfail these tests on Linux. Repository: rL LLVM https://reviews.llvm.org/D25811 Files: test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp Index: test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp === --- test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp +++ test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp @@ -17,7 +17,6 @@ // XFAIL: with_system_cxx_lib=x86_64-apple-darwin11 // XFAIL: with_system_cxx_lib=x86_64-apple-darwin12 -// XFAIL: linux #include #include @@ -35,7 +34,7 @@ std::string in("\xFA A\x07.a1"); assert(f.toupper([0], in.data() + in.size()) == in.data() + in.size()); -assert(in[0] == '\xDA'); +assert(in[0] == '\xFA'); assert(in[1] == ' '); assert(in[2] == 'A'); assert(in[3] == '\x07'); Index: test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp === --- test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp +++ test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp @@ -17,7 +17,6 @@ // XFAIL: with_system_cxx_lib=x86_64-apple-darwin11 // XFAIL: with_system_cxx_lib=x86_64-apple-darwin12 -// XFAIL: linux #include #include @@ -39,7 +38,7 @@ assert(f.toupper('a') == 'A'); assert(f.toupper('1') == '1'); assert(f.toupper('\xDA') == '\xDA'); -assert(f.toupper('\xFA') == '\xDA'); +assert(f.toupper('\xFA') == '\xFA'); } } { Index: test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp === --- test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp +++ test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp @@ -17,7 +17,6 @@ // XFAIL: with_system_cxx_lib=x86_64-apple-darwin11 // XFAIL: with_system_cxx_lib=x86_64-apple-darwin12 -// XFAIL: linux #include #include @@ -35,7 +34,7 @@ std::string in("\xDA A\x07.a1"); assert(f.tolower([0], in.data() + in.size()) == in.data() + in.size()); -assert(in[0] == '\xFA'); +assert(in[0] == '\xDA'); assert(in[1] == ' '); assert(in[2] == 'a'); assert(in[3] == '\x07'); Index: test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp === --- test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp +++ test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp @@ -17,7 +17,6 @@ // XFAIL: with_system_cxx_lib=x86_64-apple-darwin11 // XFAIL: with_system_cxx_lib=x86_64-apple-darwin12 -// XFAIL: linux #include #include @@ -38,7 +37,7 @@ assert(f.tolower('.') == '.'); assert(f.tolower('a') == 'a'); assert(f.tolower('1') == '1'); -assert(f.tolower('\xDA') == '\xFA'); +assert(f.tolower('\xDA') == '\xDA'); assert(f.tolower('\xFA') == '\xFA'); } } Index: test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp === --- test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp +++ test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp @@ -17,7 +17,6 @@ // XFAIL: with_system_cxx_lib=x86_64-apple-darwin11 // XFAIL: with_system_cxx_lib=x86_64-apple-darwin12 -// XFAIL: linux #include #include @@ -35,7 +34,7 @@ std::string in("\xFA A\x07.a1"); assert(f.toupper([0], in.data() + in.size()) == in.data() + in.size()); -assert(in[0] == '\xDA'); +assert(in[0] == '\xFA'); assert(in[1] == ' '); assert(in[2] == 'A'); assert(in[3] == '\x07'); Index: test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
[PATCH] D25811: [libcxx] Fix toupper/tolower tests for UTF-8 locale
kparzysz added a comment. In https://reviews.llvm.org/D25811#575105, @EricWF wrote: > Seems like we should figure out why these pass on ToT OS X. All of them have // XFAIL: with_system_cxx_lib=x86_64-apple-darwin11 // XFAIL: with_system_cxx_lib=x86_64-apple-darwin12 Maybe that's it. I don't have access to OS X, so I can't test it there. Repository: rL LLVM https://reviews.llvm.org/D25811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D25811: [libcxx] Fix toupper/tolower tests for UTF-8 locale
EricWF added a comment. Seems like we should figure out why these pass on ToT OS X. Repository: rL LLVM https://reviews.llvm.org/D25811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D25811: [libcxx] Fix toupper/tolower tests for UTF-8 locale
kparzysz created this revision. kparzysz added a reviewer: EricWF. kparzysz added a subscriber: cfe-commits. kparzysz set the repository for this revision to rL LLVM. The characters like '\xDA' or '\xFA' are not valid representations of anything in UTF-8, so toupper and tolower return the character itself in that locale. Repository: rL LLVM https://reviews.llvm.org/D25811 Files: test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp Index: test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp === --- test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp +++ test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp @@ -35,7 +35,7 @@ std::string in("\xFA A\x07.a1"); assert(f.toupper([0], in.data() + in.size()) == in.data() + in.size()); -assert(in[0] == '\xDA'); +assert(in[0] == '\xFA'); assert(in[1] == ' '); assert(in[2] == 'A'); assert(in[3] == '\x07'); Index: test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp === --- test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp +++ test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp @@ -39,7 +39,7 @@ assert(f.toupper('a') == 'A'); assert(f.toupper('1') == '1'); assert(f.toupper('\xDA') == '\xDA'); -assert(f.toupper('\xFA') == '\xDA'); +assert(f.toupper('\xFA') == '\xFA'); } } { Index: test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp === --- test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp +++ test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp @@ -35,7 +35,7 @@ std::string in("\xDA A\x07.a1"); assert(f.tolower([0], in.data() + in.size()) == in.data() + in.size()); -assert(in[0] == '\xFA'); +assert(in[0] == '\xDA'); assert(in[1] == ' '); assert(in[2] == 'a'); assert(in[3] == '\x07'); Index: test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp === --- test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp +++ test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp @@ -38,7 +38,7 @@ assert(f.tolower('.') == '.'); assert(f.tolower('a') == 'a'); assert(f.tolower('1') == '1'); -assert(f.tolower('\xDA') == '\xFA'); +assert(f.tolower('\xDA') == '\xDA'); assert(f.tolower('\xFA') == '\xFA'); } } Index: test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp === --- test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp +++ test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp @@ -35,7 +35,7 @@ std::string in("\xFA A\x07.a1"); assert(f.toupper([0], in.data() + in.size()) == in.data() + in.size()); -assert(in[0] == '\xDA'); +assert(in[0] == '\xFA'); assert(in[1] == ' '); assert(in[2] == 'A'); assert(in[3] == '\x07'); Index: test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp === --- test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp +++ test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp @@ -39,7 +39,7 @@ assert(f.toupper('a') == 'A'); assert(f.toupper('1') == '1'); assert(f.toupper('\xDA') == '\xDA'); -assert(f.toupper('\xFA') == '\xDA'); +assert(f.toupper('\xFA') == '\xFA'); } } { Index: