[PATCH] D25811: [libcxx] Fix toupper/tolower tests for UTF-8 locale

Krzysztof Parzyszek via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 20 06:38:48 PDT 2016


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 <locale>
 #include <string>
@@ -35,7 +34,7 @@
             std::string in("\xFA A\x07.a1");
 
             assert(f.toupper(&in[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 <locale>
 #include <cassert>
@@ -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 <locale>
 #include <string>
@@ -35,7 +34,7 @@
             std::string in("\xDA A\x07.a1");
 
             assert(f.tolower(&in[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 <locale>
 #include <cassert>
@@ -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');
         }
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25811.75292.patch
Type: text/x-patch
Size: 3487 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161020/89237e79/attachment.bin>


More information about the cfe-commits mailing list