[libcxx-commits] [PATCH] D91165: [libc++] Fix two fr_FR locale tests on FreeBSD

Alexander Richardson via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 26 08:11:06 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0b20d0af3f0a: [libc++] Fix two fr_FR locale tests on FreeBSD (authored by arichardson).

Changed prior to commit:
  https://reviews.llvm.org/D91165?vs=304186&id=307874#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91165/new/

https://reviews.llvm.org/D91165

Files:
  libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
  libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp


Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp
@@ -49,14 +49,15 @@
         : Fw(refs) {}
 };
 
-
 // GLIBC 2.27 and newer use U2027 (narrow non-breaking space) as a thousands sep.
 // this function converts the spaces in string inputs to that character if need
-// be.
+// be. FreeBSD's locale data also uses U2027 since 2018.
 static std::wstring convert_thousands_sep(std::wstring const& in) {
+#if defined(_CS_GNU_LIBC_VERSION) || defined(__FreeBSD__)
 #if defined(_CS_GNU_LIBC_VERSION)
   if (glibc_version_less_than("2.27"))
     return in;
+#endif
   std::wstring out;
   unsigned I = 0;
   bool seen_num_start = false;
Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
@@ -49,14 +49,15 @@
         : Fw(refs) {}
 };
 
-
 // GLIBC 2.27 and newer use U2027 (narrow non-breaking space) as a thousands sep.
 // this function converts the spaces in string inputs to that character if need
-// be.
+// be. FreeBSD's locale data also uses U2027 since 2018.
 static std::wstring convert_thousands_sep(std::wstring const& in) {
+#if defined(_CS_GNU_LIBC_VERSION) || defined(__FreeBSD__)
 #if defined(_CS_GNU_LIBC_VERSION)
   if (glibc_version_less_than("2.27"))
     return in;
+#endif
   std::wstring out;
   unsigned I = 0;
   bool seen_decimal = false;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91165.307874.patch
Type: text/x-patch
Size: 2152 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201126/52ddbf9e/attachment.bin>


More information about the libcxx-commits mailing list