[libcxx-commits] [libcxx] [libc++][FreeBSD] Fix Moneypunct test on FreeBSD (PR #186066)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 12 07:45:25 PDT 2026
https://github.com/aokblast updated https://github.com/llvm/llvm-project/pull/186066
>From 0fcb406fb213d835ec4a437bb8fcef76c15f5895 Mon Sep 17 00:00:00 2001
From: ShengYi Hung <aokblast at FreeBSD.org>
Date: Thu, 12 Mar 2026 17:49:40 +0800
Subject: [PATCH] [libc++][FreeBSD] Fix localization test on FreeBSD
Some ifdefs are missing so that we try to add it back and allow test to
run.
---
.../get_long_double_zh_CN.pass.cpp | 25 ++++++-----
.../put_long_double_zh_CN.pass.cpp | 41 +++++++++----------
.../curr_symbol.pass.cpp | 4 +-
.../neg_format.pass.cpp | 6 +--
.../pos_format.pass.cpp | 6 +--
.../locale.time.put.byname/put1.pass.cpp | 4 +-
.../locale.numpunct.byname/grouping.pass.cpp | 4 +-
.../thousands_sep.pass.cpp | 6 +--
libcxx/test/support/locale_helpers.h | 2 +-
9 files changed, 43 insertions(+), 55 deletions(-)
diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
index d83167d1ee458..35d327015f6b4 100644
--- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
@@ -9,7 +9,6 @@
// NetBSD does not support LC_MONETARY at the moment
// XFAIL: netbsd
-// XFAIL: LIBCXX-FREEBSD-FIXME
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
// REQUIRES: locale.zh_CN.UTF-8
@@ -156,7 +155,7 @@ int main(int, char**)
std::noshowbase(ios);
}
{ // negative one, showbase
-#if defined(_AIX) || defined(__APPLE__)
+#if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
std::string v = "-" + currency_symbol + "0.01";
#else
std::string v = currency_symbol + "-0.01";
@@ -170,7 +169,7 @@ int main(int, char**)
assert(ex == -1);
}
{ // negative one, showbase
-#if defined(_AIX) || defined(__APPLE__)
+#if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
std::string v = "-" + currency_symbol + "0.01";
#else
std::string v = currency_symbol + "-0.01";
@@ -210,7 +209,7 @@ int main(int, char**)
std::noshowbase(ios);
}
{ // negative, showbase
-#if defined(_AIX) || defined(__APPLE__)
+#if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
std::string v = "-" + currency_symbol + "1,234,567.89";
#else
std::string v = currency_symbol + "-1,234,567.89";
@@ -331,7 +330,7 @@ int main(int, char**)
std::noshowbase(ios);
}
{ // negative one, showbase
-#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
std::string v = "-" + currency_name + "0.01";
#else
std::string v = currency_name + "-0.01";
@@ -346,7 +345,7 @@ int main(int, char**)
assert(ex == -1);
}
{ // negative one, showbase
-#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
std::string v = "-" + currency_name + "0.01";
#else
std::string v = currency_name + "-0.01";
@@ -387,7 +386,7 @@ int main(int, char**)
std::noshowbase(ios);
}
{ // negative, showbase
-#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
std::string v = "-" + currency_name + "1,234,567.89";
#else
std::string v = currency_name + "-1,234,567.89";
@@ -516,7 +515,7 @@ int main(int, char**)
std::noshowbase(ios);
}
{ // negative one, showbase
-# if defined(_AIX) || defined(__APPLE__)
+# if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
std::wstring v = L"-" + w_currency_symbol + L"0.01";
# else
std::wstring v = w_currency_symbol + L"-0.01";
@@ -530,7 +529,7 @@ int main(int, char**)
assert(ex == -1);
}
{ // negative one, showbase
-# if defined(_AIX) || defined(__APPLE__)
+# if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
std::wstring v = L"-" + w_currency_symbol + L"0.01";
# else
std::wstring v = w_currency_symbol + L"-0.01";
@@ -570,7 +569,7 @@ int main(int, char**)
std::noshowbase(ios);
}
{ // negative, showbase
-# if defined(_AIX) || defined(__APPLE__)
+# if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
std::wstring v = L"-" + w_currency_symbol + L"1,234,567.89";
# else
std::wstring v = w_currency_symbol + L"-1,234,567.89";
@@ -691,7 +690,7 @@ int main(int, char**)
std::noshowbase(ios);
}
{ // negative one, showbase
-# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
std::wstring v = L"-" + w_currency_name + L"0.01";
# else
std::wstring v = w_currency_name + L"-0.01";
@@ -705,7 +704,7 @@ int main(int, char**)
assert(ex == -1);
}
{ // negative one, showbase
-# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
std::wstring v = L"-" + w_currency_name + L"0.01";
# else
std::wstring v = w_currency_name + L"-0.01";
@@ -745,7 +744,7 @@ int main(int, char**)
std::noshowbase(ios);
}
{ // negative, showbase
-# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
std::wstring v = L"-" + w_currency_name + L"1,234,567.89";
# else
std::wstring v = w_currency_name + L"-1,234,567.89";
diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
index d970b55eb704b..f087b21beaf42 100644
--- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
@@ -9,7 +9,6 @@
// NetBSD does not support LC_MONETARY at the moment
// XFAIL: netbsd
-// XFAIL: LIBCXX-FREEBSD-FIXME
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
// REQUIRES: locale.zh_CN.UTF-8
@@ -120,7 +119,7 @@ int main(int, char**)
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), false, ios, '*', v);
std::string ex(str, base(iter));
-#if defined(_AIX) || defined(__APPLE__)
+#if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == "-" + currency_symbol + "0.01");
#else
assert(ex == currency_symbol + "-0.01");
@@ -140,7 +139,7 @@ int main(int, char**)
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), false, ios, '*', v);
std::string ex(str, base(iter));
-#if defined(_AIX) || defined(__APPLE__)
+#if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == "-" + currency_symbol + "1,234,567.89");
#else
assert(ex == currency_symbol + "-1,234,567.89");
@@ -154,7 +153,7 @@ int main(int, char**)
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), false, ios, ' ', v);
std::string ex(str, base(iter));
-#if defined(_AIX) || defined(__APPLE__)
+#if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == "-" + currency_symbol + "1,234,567.89" + currency_symbol_padding);
#else
assert(ex == currency_symbol + "-1,234,567.89" + currency_symbol_padding);
@@ -169,7 +168,7 @@ int main(int, char**)
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), false, ios, ' ', v);
std::string ex(str, base(iter));
-#if defined(_AIX) || defined(__APPLE__)
+#if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == "-" + currency_symbol + currency_symbol_padding + "1,234,567.89");
#else
assert(ex == currency_symbol + "-" + currency_symbol_padding + "1,234,567.89");
@@ -184,7 +183,7 @@ int main(int, char**)
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), false, ios, ' ', v);
std::string ex(str, base(iter));
-#if defined(_AIX) || defined(__APPLE__)
+#if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == currency_symbol_padding + "-" + currency_symbol + "1,234,567.89");
#else
assert(ex == currency_symbol_padding + currency_symbol + "-1,234,567.89");
@@ -237,7 +236,7 @@ int main(int, char**)
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, '*', v);
std::string ex(str, base(iter));
-#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == "-" + currency_name + "0.01");
#else
assert(ex == currency_name + "-0.01");
@@ -257,7 +256,7 @@ int main(int, char**)
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, '*', v);
std::string ex(str, base(iter));
-#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == "-" + currency_name + "1,234,567.89");
#else
assert(ex == currency_name + "-1,234,567.89");
@@ -271,7 +270,7 @@ int main(int, char**)
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, ' ', v);
std::string ex(str, base(iter));
-#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == "-" + currency_name + "1,234,567.89" + currency_name_padding);
#else
assert(ex == currency_name + "-1,234,567.89" + currency_name_padding);
@@ -286,7 +285,7 @@ int main(int, char**)
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, ' ', v);
std::string ex(str, base(iter));
-#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == "-" + currency_name + currency_name_padding + "1,234,567.89");
#else
assert(ex == currency_name + "-" + currency_name_padding + "1,234,567.89");
@@ -301,7 +300,7 @@ int main(int, char**)
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, ' ', v);
std::string ex(str, base(iter));
-#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == currency_name_padding + "-" + currency_name + "1,234,567.89");
#else
assert(ex == currency_name_padding + currency_name + "-1,234,567.89");
@@ -364,7 +363,7 @@ int main(int, char**)
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), false, ios, '*', v);
std::wstring ex(str, base(iter));
-# if defined(_AIX) || defined(__APPLE__)
+# if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == L"-" + currency_symbol + L"0.01");
# else
assert(ex == currency_symbol + L"-0.01");
@@ -384,7 +383,7 @@ int main(int, char**)
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), false, ios, '*', v);
std::wstring ex(str, base(iter));
-# if defined(_AIX) || defined(__APPLE__)
+# if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == L"-" + currency_symbol + L"1,234,567.89");
# else
assert(ex == currency_symbol + L"-1,234,567.89");
@@ -398,7 +397,7 @@ int main(int, char**)
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), false, ios, ' ', v);
std::wstring ex(str, base(iter));
-# if defined(_AIX) || defined(__APPLE__)
+# if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == L"-" + currency_symbol + L"1,234,567.89 ");
# else
assert(ex == currency_symbol + L"-1,234,567.89 ");
@@ -413,7 +412,7 @@ int main(int, char**)
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), false, ios, ' ', v);
std::wstring ex(str, base(iter));
-# if defined(_AIX) || defined(__APPLE__)
+# if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == L"-" + currency_symbol + L" 1,234,567.89");
# else
assert(ex == currency_symbol + L"- 1,234,567.89");
@@ -428,7 +427,7 @@ int main(int, char**)
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), false, ios, ' ', v);
std::wstring ex(str, base(iter));
-# if defined(_AIX) || defined(__APPLE__)
+# if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == L" -" + currency_symbol + L"1,234,567.89");
# else
assert(ex == L" " + currency_symbol + L"-1,234,567.89");
@@ -481,7 +480,7 @@ int main(int, char**)
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, '*', v);
std::wstring ex(str, base(iter));
-# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == L"-" + currency_name + L"0.01");
#else
assert(ex == currency_name + L"-0.01");
@@ -501,7 +500,7 @@ int main(int, char**)
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, '*', v);
std::wstring ex(str, base(iter));
-# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == L"-" + currency_name + L"1,234,567.89");
#else
assert(ex == currency_name + L"-1,234,567.89");
@@ -515,7 +514,7 @@ int main(int, char**)
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, ' ', v);
std::wstring ex(str, base(iter));
-# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == L"-" + currency_name + L"1,234,567.89" + currency_name_padding);
#else
assert(ex == currency_name + L"-1,234,567.89" + currency_name_padding);
@@ -530,7 +529,7 @@ int main(int, char**)
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, ' ', v);
std::wstring ex(str, base(iter));
-# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == L"-" + currency_name + currency_name_padding + L"1,234,567.89");
#else
assert(ex == currency_name + L"-" + currency_name_padding + L"1,234,567.89");
@@ -545,7 +544,7 @@ int main(int, char**)
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, ' ', v);
std::wstring ex(str, base(iter));
-# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)
+# if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert(ex == currency_name_padding + L"-" + currency_name + L"1,234,567.89");
#else
assert(ex == currency_name_padding + currency_name + L"-1,234,567.89");
diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
index e7f0f29e87742..0cc0a075d13fa 100644
--- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
@@ -153,7 +153,7 @@ int main(int, char**)
{
Fnf f(LOCALE_zh_CN_UTF_8, 1);
-#if defined(_WIN32) || defined(__APPLE__)
+#if defined(_WIN32) || defined(__APPLE__) || defined(__FreeBSD__)
assert(f.curr_symbol() == "\xC2\xA5"); // \u00A5
#else
assert(f.curr_symbol() == "\xEF\xBF\xA5"); // \uFFE5
@@ -166,7 +166,7 @@ int main(int, char**)
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
{
Fwf f(LOCALE_zh_CN_UTF_8, 1);
-#if defined(_WIN32) || defined(__APPLE__)
+# if defined(_WIN32) || defined(__APPLE__) || defined(__FreeBSD__)
assert(f.curr_symbol() == L"\u00A5");
#else
assert(f.curr_symbol() == L"\uFFE5");
diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
index e9528147dfe62..1225f70966847 100644
--- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
@@ -9,8 +9,6 @@
// NetBSD does not support LC_MONETARY at the moment
// XFAIL: netbsd
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// REQUIRES: locale.en_US.UTF-8
// REQUIRES: locale.fr_FR.UTF-8
// REQUIRES: locale.ru_RU.UTF-8
@@ -184,7 +182,7 @@ int main(int, char**)
{
Fnf f(LOCALE_zh_CN_UTF_8, 1);
std::money_base::pattern p = f.neg_format();
-#if defined(_AIX) || defined(__APPLE__)
+#if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert_sign_symbol_none_value(p);
#else
assert_symbol_sign_none_value(p);
@@ -203,7 +201,7 @@ int main(int, char**)
{
Fwf f(LOCALE_zh_CN_UTF_8, 1);
std::money_base::pattern p = f.neg_format();
-#if defined(_AIX) || defined(__APPLE__)
+# if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
assert_sign_symbol_none_value(p);
#else
assert_symbol_sign_none_value(p);
diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
index 11832a7d89278..2db6b353b7114 100644
--- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
@@ -9,8 +9,6 @@
// NetBSD does not support LC_MONETARY at the moment
// XFAIL: netbsd
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// REQUIRES: locale.en_US.UTF-8
// REQUIRES: locale.fr_FR.UTF-8
// REQUIRES: locale.ru_RU.UTF-8
@@ -184,7 +182,7 @@ int main(int, char**)
{
Fnf f(LOCALE_zh_CN_UTF_8, 1);
std::money_base::pattern p = f.pos_format();
-#if defined(__APPLE__) || defined(_AIX)
+#if defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
assert_sign_symbol_none_value(p);
#else
assert_symbol_sign_none_value(p);
@@ -203,7 +201,7 @@ int main(int, char**)
{
Fwf f(LOCALE_zh_CN_UTF_8, 1);
std::money_base::pattern p = f.pos_format();
-#if defined(__APPLE__) || defined(_AIX)
+# if defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
assert_sign_symbol_none_value(p);
#else
assert_symbol_sign_none_value(p);
diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
index b6bcfc935393f..21c545d4fb185 100644
--- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
@@ -9,8 +9,6 @@
// NetBSD does not support LC_TIME at the moment
// XFAIL: netbsd
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// REQUIRES: locale.en_US.UTF-8
// REQUIRES: locale.fr_FR.UTF-8
// REQUIRES: locale.ja_JP.UTF-8
@@ -87,7 +85,7 @@ int main(int, char**)
cpp17_output_iterator<char*> iter =
f.put(cpp17_output_iterator<char*>(str), ios, '*', &t, pat.data(), pat.data() + pat.size());
std::string ex(str, base(iter));
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
// These platforms have no alternative
assert(ex == "Today is \xE5\x9C\x9F\xE6\x9B\x9C\xE6\x97\xA5 which is the 6th day or alternatively 6.");
#else
diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
index 11ec75469c704..b9c613956d1dd 100644
--- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
@@ -9,8 +9,6 @@
// NetBSD does not support LC_NUMERIC at the moment
// XFAIL: netbsd
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// REQUIRES: locale.en_US.UTF-8
// REQUIRES: locale.fr_FR.UTF-8
@@ -60,7 +58,7 @@ int main(int, char**)
}
{
std::locale l(LOCALE_fr_FR_UTF_8);
-#if defined(TEST_HAS_GLIBC) || defined(_WIN32) || defined(_AIX) || defined(__APPLE__)
+#if defined(TEST_HAS_GLIBC) || defined(_WIN32) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
const char* const group = "\3";
#else
const char* const group = "\x7f";
diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
index 53f2c8554f3d7..8074c889bab4c 100644
--- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
@@ -9,8 +9,6 @@
// NetBSD does not support LC_NUMERIC at the moment
// XFAIL: netbsd
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// REQUIRES: locale.en_US.UTF-8
// REQUIRES: locale.fr_FR.UTF-8
@@ -66,8 +64,8 @@ int main(int, char**)
// The below tests work around GLIBC's use of U202F as LC_NUMERIC thousands_sep.
std::locale l(LOCALE_fr_FR_UTF_8);
{
-#if defined(_CS_GNU_LIBC_VERSION) || defined(_WIN32) || defined(_AIX) || defined(__APPLE__)
- const char sep = ' ';
+#if defined(_CS_GNU_LIBC_VERSION) || defined(_WIN32) || defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__)
+ const char sep = ' ';
#else
const char sep = ',';
#endif
diff --git a/libcxx/test/support/locale_helpers.h b/libcxx/test/support/locale_helpers.h
index 3cec7397e3d7e..bd29fd2a85111 100644
--- a/libcxx/test/support/locale_helpers.h
+++ b/libcxx/test/support/locale_helpers.h
@@ -87,7 +87,7 @@ MultiStringType currency_symbol_ru_RU() {
MultiStringType currency_symbol_zh_CN() {
#if defined(_WIN32)
return MKSTR("\u00A5"); // U+00A5 YEN SIGN
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
if (__builtin_available(macOS 15.4, *)) {
return MKSTR("\u00A5"); // U+00A5 YEN SIGN
} else {
More information about the libcxx-commits
mailing list