[libcxx-commits] [libcxx] c6b0a8d - [libc++][FreeBSD] Fix localization test on FreeBSD (#186066)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jun 27 09:42:56 PDT 2026
Author: aokblast
Date: 2026-06-28T00:42:51+08:00
New Revision: c6b0a8d2f99aa81978ec12170e27ade8f138aebd
URL: https://github.com/llvm/llvm-project/commit/c6b0a8d2f99aa81978ec12170e27ade8f138aebd
DIFF: https://github.com/llvm/llvm-project/commit/c6b0a8d2f99aa81978ec12170e27ade8f138aebd.diff
LOG: [libc++][FreeBSD] Fix localization test on FreeBSD (#186066)
Some ifdefs are missing so that we try to add it back and allow test to
run.
Added:
Modified:
libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
libcxx/test/support/locale_helpers.h
Removed:
################################################################################
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 c86df7e6b53bf..7721ffc05852a 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,8 +9,6 @@
// NetBSD does not support LC_MONETARY at the moment
// XFAIL: netbsd
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// REQUIRES: locale.zh_CN.UTF-8
// <locale>
@@ -155,7 +153,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";
@@ -169,7 +167,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";
@@ -209,7 +207,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";
@@ -330,7 +328,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";
@@ -345,7 +343,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";
@@ -386,7 +384,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";
@@ -515,7 +513,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";
@@ -529,7 +527,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";
@@ -569,7 +567,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";
@@ -690,7 +688,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";
@@ -704,7 +702,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";
@@ -744,7 +742,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 25046a8417083..b9bcb774b6678 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,8 +9,6 @@
// NetBSD does not support LC_MONETARY at the moment
// XFAIL: netbsd
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// REQUIRES: locale.zh_CN.UTF-8
// <locale>
@@ -119,7 +117,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");
@@ -139,7 +137,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");
@@ -153,7 +151,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);
@@ -168,7 +166,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");
@@ -183,7 +181,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");
@@ -236,7 +234,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");
@@ -256,7 +254,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");
@@ -270,7 +268,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);
@@ -285,7 +283,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");
@@ -300,7 +298,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");
@@ -363,7 +361,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");
@@ -383,7 +381,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");
@@ -397,7 +395,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 ");
@@ -412,7 +410,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");
@@ -427,7 +425,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");
@@ -480,7 +478,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");
@@ -500,7 +498,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");
@@ -514,7 +512,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);
@@ -529,7 +527,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");
@@ -544,7 +542,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