[libcxx-commits] [libcxx] 8f01029 - [libc++][chrono] Fixes FreeBSD tests.
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 17 09:00:30 PDT 2023
Author: Mark de Wever
Date: 2023-08-17T18:00:25+02:00
New Revision: 8f01029b17a392cee020e5d23816c7a6fffd63ee
URL: https://github.com/llvm/llvm-project/commit/8f01029b17a392cee020e5d23816c7a6fffd63ee
DIFF: https://github.com/llvm/llvm-project/commit/8f01029b17a392cee020e5d23816c7a6fffd63ee.diff
LOG: [libc++][chrono] Fixes FreeBSD tests.
This adjusts the output of the tests to match reality.
Reviewed By: emaste, #libc, dim, philnik
Differential Revision: https://reviews.llvm.org/D157778
Added:
Modified:
libcxx/test/std/time/time.cal/time.cal.mdlast/ostream.pass.cpp
libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/ostream.pass.cpp
libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/ostream.pass.cpp
libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/ostream.pass.cpp
libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/ostream.pass.cpp
libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/ostream.pass.cpp
libcxx/test/std/time/time.syn/formatter.day.pass.cpp
libcxx/test/std/time/time.syn/formatter.duration.pass.cpp
libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp
libcxx/test/std/time/time.syn/formatter.hh_mm_ss.pass.cpp
libcxx/test/std/time/time.syn/formatter.local_time.pass.cpp
libcxx/test/std/time/time.syn/formatter.month.pass.cpp
libcxx/test/std/time/time.syn/formatter.month_day.pass.cpp
libcxx/test/std/time/time.syn/formatter.month_day_last.pass.cpp
libcxx/test/std/time/time.syn/formatter.month_weekday.pass.cpp
libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp
libcxx/test/std/time/time.syn/formatter.weekday.pass.cpp
libcxx/test/std/time/time.syn/formatter.weekday_index.pass.cpp
libcxx/test/std/time/time.syn/formatter.weekday_last.pass.cpp
libcxx/test/std/time/time.syn/formatter.year.pass.cpp
libcxx/test/std/time/time.syn/formatter.year_month.pass.cpp
libcxx/test/std/time/time.syn/formatter.year_month_day.pass.cpp
libcxx/test/std/time/time.syn/formatter.year_month_day_last.pass.cpp
libcxx/test/std/time/time.syn/formatter.year_month_weekday.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/time/time.cal/time.cal.mdlast/ostream.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.mdlast/ostream.pass.cpp
index 9dc8e1ef10c68e..a4c9b1f79ee809 100644
--- a/libcxx/test/std/time/time.cal/time.cal.mdlast/ostream.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.mdlast/ostream.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -108,7 +106,7 @@ static void test() {
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day_last{std::chrono::month{1}}), SV("janv./last"));
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day_last{std::chrono::month{2}}), SV("févr./last"));
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day_last{std::chrono::month{3}}), SV("mars/last"));
-# if defined(_WIN32) || defined(_AIX)
+# if defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day_last{std::chrono::month{4}}), SV("avr./last"));
# else
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day_last{std::chrono::month{4}}), SV("avril/last"));
diff --git a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/ostream.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/ostream.pass.cpp
index 7833a1612cacee..8c94dad8d6dff5 100644
--- a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/ostream.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/ostream.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -104,7 +102,7 @@ static void test() {
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month{1}), SV("janv."));
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month{2}), SV("févr."));
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month{3}), SV("mars"));
-# if defined(_WIN32) || defined(_AIX)
+# if defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month{4}), SV("avr."));
# else
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month{4}), SV("avril"));
diff --git a/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/ostream.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/ostream.pass.cpp
index 9fffad9224f9c9..5559d377ffd13e 100644
--- a/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/ostream.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/ostream.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -175,7 +173,7 @@ static void test() {
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_weekday{
std::chrono::month{3}, std::chrono::weekday_indexed{std::chrono::weekday{3}, 3}}),
SV("mars/mer.[3]"));
-# if defined(_WIN32) || defined(_AIX)
+# if defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_weekday{
std::chrono::month{4}, std::chrono::weekday_indexed{std::chrono::weekday{4}, 4}}),
SV("avr./jeu.[4]"));
diff --git a/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/ostream.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/ostream.pass.cpp
index ee75fd208c4cc7..4834f20524481a 100644
--- a/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/ostream.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/ostream.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -172,15 +170,15 @@ static void test() {
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_weekday_last{
std::chrono::month{3}, std::chrono::weekday_last{std::chrono::weekday{2}}}),
SV("mars/mar.[last]"));
-# if defined(_WIN32) || defined(_AIX)
+# if defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_weekday_last{
std::chrono::month{4}, std::chrono::weekday_last{std::chrono::weekday{3}}}),
SV("avr./mer.[last]"));
-# else // defined(_WIN32) || defined(_AIX)
+# else // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_weekday_last{
std::chrono::month{4}, std::chrono::weekday_last{std::chrono::weekday{3}}}),
SV("avril/mer.[last]"));
-# endif // defined(_WIN32) || defined(_AIX)
+# endif // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_weekday_last{
std::chrono::month{5}, std::chrono::weekday_last{std::chrono::weekday{4}}}),
SV("mai/jeu.[last]"));
diff --git a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/ostream.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/ostream.pass.cpp
index 0955ba11d60788..b7dd71173cdbbb 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/ostream.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/ostream.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -135,13 +133,13 @@ static void test() {
SV("-32767/févr."));
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::year_month{std::chrono::year{0}, std::chrono::month{3}}),
SV("0000/mars"));
-# if defined(_WIN32) || defined(_AIX)
+# if defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::year_month{std::chrono::year{1970}, std::chrono::month{4}}),
SV("1970/avr."));
-# else // defined(_WIN32) || defined(_AIX)
+# else // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::year_month{std::chrono::year{1970}, std::chrono::month{4}}),
SV("1970/avril"));
-# endif // defined(_WIN32) || defined(_AIX)
+# endif // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::year_month{std::chrono::year{32'767}, std::chrono::month{5}}),
SV("32767/mai"));
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::year_month{std::chrono::year{0}, std::chrono::month{6}}),
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/ostream.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/ostream.pass.cpp
index 933edaab75b0d4..2056b2a2416f9c 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/ostream.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/ostream.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -166,15 +164,15 @@ static void test() {
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::year_month_day_last{
std::chrono::year{0}, std::chrono::month_day_last{std::chrono::month{3}}}),
SV("0000/mars/last"));
-# if defined(_WIN32) || defined(_AIX)
+# if defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::year_month_day_last{
std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::month{4}}}),
SV("1970/avr./last"));
-# else // defined(_WIN32) || defined(_AIX)
+# else // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::year_month_day_last{
std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::month{4}}}),
SV("1970/avril/last"));
-# endif // defined(_WIN32) || defined(_AIX)
+# endif // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::year_month_day_last{
std::chrono::year{32'767}, std::chrono::month_day_last{std::chrono::month{5}}}),
SV("32767/mai/last"));
diff --git a/libcxx/test/std/time/time.syn/formatter.day.pass.cpp b/libcxx/test/std/time/time.syn/formatter.day.pass.cpp
index e71ac419aaa61a..35f3af2d6dbc34 100644
--- a/libcxx/test/std/time/time.syn/formatter.day.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.day.pass.cpp
@@ -5,8 +5,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -96,7 +94,7 @@ static void test_valid_values() {
#endif
// Use supplied locale (ja_JP). This locale has a
diff erent alternate on some platforms.
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
# if defined(_WIN32)
check(loc, SV("%d=''\t%Od=''\t%e=''\t%Oe=''\n"), lfmt, 0d);
# else
@@ -111,12 +109,12 @@ static void test_valid_values() {
# else
check(SV("%d='255'\t%Od='255'\t%e='255'\t%Oe='255'\n"), fmt, 255d);
# endif
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
check(loc, SV("%d='00'\t%Od='〇'\t%e=' 0'\t%Oe='〇'\n"), lfmt, 0d);
check(loc, SV("%d='01'\t%Od='一'\t%e=' 1'\t%Oe='一'\n"), lfmt, 1d);
check(loc, SV("%d='31'\t%Od='三十一'\t%e='31'\t%Oe='三十一'\n"), lfmt, 31d);
check(loc, SV("%d='255'\t%Od='255'\t%e='255'\t%Oe='255'\n"), lfmt, 255d);
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
diff --git a/libcxx/test/std/time/time.syn/formatter.duration.pass.cpp b/libcxx/test/std/time/time.syn/formatter.duration.pass.cpp
index eaf4cb141409ee..9367055fb9694c 100644
--- a/libcxx/test/std/time/time.syn/formatter.duration.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.duration.pass.cpp
@@ -5,8 +5,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -247,7 +245,7 @@ static void test_valid_positive_integral_values() {
"%r='00:00:00'\t"
#elif defined(_AIX)
"%r='12:00:00 AM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#else
"%r='12:00:00 '\t"
@@ -280,7 +278,7 @@ static void test_valid_positive_integral_values() {
"%r='11:59:59'\t"
#elif defined(_AIX)
"%r='11:59:59 AM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#else
"%r='11:59:59 '\t"
@@ -313,7 +311,7 @@ static void test_valid_positive_integral_values() {
"%r='12:00:00'\t"
#elif defined(_AIX)
"%r='12:00:00 PM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#else
"%r='12:00:00 '\t"
@@ -344,7 +342,7 @@ static void test_valid_positive_integral_values() {
"%T='23:59:59'\t"
#if defined(_AIX)
"%r='11:59:59 PM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#elif defined(_WIN32)
"%r='23:59:59'\t"
@@ -379,7 +377,7 @@ static void test_valid_positive_integral_values() {
"%r='00:00:00'\t"
#elif defined(_AIX)
"%r='12:00:00 AM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#elif defined(_WIN32)
"%r='12:00:00'\t"
@@ -396,7 +394,7 @@ static void test_valid_positive_integral_values() {
std::chrono::duration<int, std::ratio<86400>>(7));
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
check(loc,
SV("%H='00'\t"
"%OH='00'\t"
@@ -413,8 +411,12 @@ static void test_valid_positive_integral_values() {
# endif
"%R='00:00'\t"
"%T='00:00:00'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='12:00:00 AM'\t"
+# else
+ "%r='12:00:00 午前'\t"
+# endif
"%X='00時00分00秒'\t"
"%EX='00時00分00秒'\t"
# elif defined(_WIN32)
@@ -449,8 +451,12 @@ static void test_valid_positive_integral_values() {
# endif
"%R='11:59'\t"
"%T='11:59:59'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='11:59:59 AM'\t"
+# else
+ "%r='11:59:59 午前'\t"
+# endif
"%X='11時59分59秒'\t"
"%EX='11時59分59秒'\t"
# elif defined(_WIN32)
@@ -485,8 +491,12 @@ static void test_valid_positive_integral_values() {
# endif
"%R='12:00'\t"
"%T='12:00:00'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='12:00:00 PM'\t"
+# else
+ "%r='12:00:00 午後'\t"
+# endif
"%X='12時00分00秒'\t"
"%EX='12時00分00秒'\t"
# else
@@ -521,8 +531,12 @@ static void test_valid_positive_integral_values() {
# endif
"%R='23:59'\t"
"%T='23:59:59'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='11:59:59 PM'\t"
+# else
+ "%r='11:59:59 午後'\t"
+# endif
"%X='23時59分59秒'\t"
"%EX='23時59分59秒'\t"
# else
@@ -557,8 +571,12 @@ static void test_valid_positive_integral_values() {
# endif
"%R='00:00'\t"
"%T='00:00:00'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='12:00:00 AM'\t"
+# else
+ "%r='12:00:00 午前'\t"
+# endif
"%X='00時00分00秒'\t"
"%EX='00時00分00秒'\t"
# elif defined(_WIN32)
@@ -786,7 +804,7 @@ static void test_valid_negative_integral_values() {
"%T='23:59:59'\t"
#if defined(_AIX)
"%r='11:59:59 PM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#elif defined(_WIN32)
"%r='23:59:59'\t"
@@ -803,7 +821,7 @@ static void test_valid_negative_integral_values() {
-(23h + 59min + 59s));
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
check(loc,
SV("-%H='23'\t"
"%OH='23'\t"
@@ -820,8 +838,12 @@ static void test_valid_negative_integral_values() {
# endif
"%R='23:59'\t"
"%T='23:59:59'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='11:59:59 PM'\t"
+# else
+ "%r='11:59:59 午後'\t"
+# endif
"%X='23時59分59秒'\t"
"%EX='23時59分59秒'\t"
# elif defined(_WIN32)
@@ -839,7 +861,7 @@ static void test_valid_negative_integral_values() {
"\n"),
lfmt,
-(23h + 59min + 59s));
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)|| defined(__FreeBSD__)
check(loc,
SV("-%H='23'\t"
"%OH='二十三'\t"
@@ -861,7 +883,7 @@ static void test_valid_negative_integral_values() {
"\n"),
lfmt,
-(23h + 59min + 59s));
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)|| defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -1014,7 +1036,8 @@ static void test_valid_fractional_values() {
check(loc, SV("00.011"), SV("{:L%S}"), std::chrono::duration<double, std::milli>(11.123456789));
check(loc, SV("01"), SV("{:L%S}"), std::chrono::duration<long double>(61.123456789));
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
+
check(SV("00.000000001"), SV("{:%OS}"), 1ns);
check(SV("00.000000501"), SV("{:%OS}"), 501ns);
check(SV("00.000001000"), SV("{:%OS}"), 1000ns);
@@ -1030,7 +1053,8 @@ static void test_valid_fractional_values() {
check(SV("00.001"), SV("{:%OS}"), std::chrono::duration<float, std::milli>(1.123456789));
check(SV("00.011"), SV("{:%OS}"), std::chrono::duration<double, std::milli>(11.123456789));
check(SV("01"), SV("{:%OS}"), std::chrono::duration<long double>(61.123456789));
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)|| defined(__FreeBSD__)
+
check(loc, SV("〇.000000001"), SV("{:L%OS}"), 1ns);
check(loc, SV("〇.000000501"), SV("{:L%OS}"), 501ns);
check(loc, SV("〇.000001000"), SV("{:L%OS}"), 1000ns);
@@ -1046,7 +1070,7 @@ static void test_valid_fractional_values() {
check(loc, SV("〇.001"), SV("{:L%OS}"), std::chrono::duration<float, std::milli>(1.123456789));
check(loc, SV("〇.011"), SV("{:L%OS}"), std::chrono::duration<double, std::milli>(11.123456789));
check(loc, SV("一"), SV("{:L%OS}"), std::chrono::duration<long double>(61.123456789));
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)|| defined(__FreeBSD__)
check(loc, SV("01:05:06.000000001"), SV("{:L%T}"), 1h + 5min + 6s + 1ns);
check(loc, SV("01:05:06.000000501"), SV("{:L%T}"), 1h + 5min + 6s + 501ns);
diff --git a/libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp b/libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp
index 7853f2f3d5ac2d..dceb6ac9ae38f9 100644
--- a/libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp
@@ -9,8 +9,6 @@
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// TODO FMT This test should not require std::to_chars(floating-point)
// XFAIL: availability-fp_to_chars-missing
@@ -109,7 +107,8 @@ static void test_valid_values_year() {
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
+
check(loc,
SV("%C='19'\t%EC='19'\t%y='70'\t%Oy='70'\t%Ey='70'\t%Y='1970'\t%EY='1970'\n"),
lfmt,
@@ -119,7 +118,8 @@ static void test_valid_values_year() {
SV("%C='20'\t%EC='20'\t%y='09'\t%Oy='09'\t%Ey='09'\t%Y='2009'\t%EY='2009'\n"),
lfmt,
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)|| defined(__FreeBSD__)
+
check(loc,
SV("%C='19'\t%EC='昭和'\t%y='70'\t%Oy='七十'\t%Ey='45'\t%Y='1970'\t%EY='昭和45年'\n"),
lfmt,
@@ -129,7 +129,7 @@ static void test_valid_values_year() {
SV("%C='20'\t%EC='平成'\t%y='09'\t%Oy='九'\t%Ey='21'\t%Y='2009'\t%EY='平成21年'\n"),
lfmt,
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)|| defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -199,6 +199,16 @@ static void test_valid_values_month() {
SV("%b=' 5'\t%h=' 5'\t%B='5月'\t%m='05'\t%Om='05'\n"),
lfmt,
file_seconds(2'000'000'000s)); // 03:33:20 UTC on Wednesday, 18 May 2033
+#elif defined(__FreeBSD__) // _WIN32
+ check(loc,
+ SV("%b=' 1月'\t%h=' 1月'\t%B='1月'\t%m='01'\t%Om='01'\n"),
+ lfmt,
+ file_seconds(0s)); // 00:00:00 UTC Thursday, 1 January 1970
+
+ check(loc,
+ SV("%b=' 5月'\t%h=' 5月'\t%B='5月'\t%m='05'\t%Om='05'\n"),
+ lfmt,
+ file_seconds(2'000'000'000s)); // 03:33:20 UTC on Wednesday, 18 May 2033
#else // _WIN32
check(loc,
SV("%b=' 1月'\t%h=' 1月'\t%B='1月'\t%m='01'\t%Om='一'\n"),
@@ -241,7 +251,7 @@ static void test_valid_values_day() {
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%d='01'\t%Od='01'\t%e=' 1'\t%Oe=' 1'\n"),
lfmt,
@@ -251,7 +261,7 @@ static void test_valid_values_day() {
SV("%d='13'\t%Od='13'\t%e='13'\t%Oe='13'\n"),
lfmt,
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#else // _WIN32
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%d='01'\t%Od='一'\t%e=' 1'\t%Oe='一'\n"),
lfmt,
@@ -262,7 +272,7 @@ static void test_valid_values_day() {
lfmt,
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // _WIN32
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -309,7 +319,7 @@ static void test_valid_values_weekday() {
// Use supplied locale (ja_JP).
// This locale has a
diff erent alternate, but not on all platforms
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%a='木'\t%A='木曜日'\t%u='4'\t%Ou='4'\t%w='4'\t%Ow='4'\n"),
lfmt,
@@ -319,7 +329,7 @@ static void test_valid_values_weekday() {
SV("%a='日'\t%A='日曜日'\t%u='7'\t%Ou='7'\t%w='0'\t%Ow='0'\n"),
lfmt,
file_seconds(4'294'967'295s)); // 06:28:15 UTC on Sunday, 7 February 2106
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%a='木'\t%A='木曜日'\t%u='4'\t%Ou='四'\t%w='4'\t%Ow='四'\n"),
lfmt,
@@ -329,7 +339,7 @@ static void test_valid_values_weekday() {
SV("%a='日'\t%A='日曜日'\t%u='7'\t%Ou='七'\t%w='0'\t%Ow='〇'\n"),
lfmt,
file_seconds(4'294'967'295s)); // 06:28:15 UTC on Sunday, 7 February 2106
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -387,7 +397,7 @@ static void test_valid_values_week() {
file_seconds(2'000'000'000s)); // 03:33:20 UTC on Wednesday, 18 May 2033
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%U='00'\t%OU='00'\t%W='00'\t%OW='00'\n"),
lfmt,
@@ -397,7 +407,7 @@ static void test_valid_values_week() {
SV("%U='20'\t%OU='20'\t%W='20'\t%OW='20'\n"),
lfmt,
file_seconds(2'000'000'000s)); // 03:33:20 UTC on Wednesday, 18 May 2033
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%U='00'\t%OU='〇'\t%W='00'\t%OW='〇'\n"),
lfmt,
@@ -407,7 +417,7 @@ static void test_valid_values_week() {
SV("%U='20'\t%OU='二十'\t%W='20'\t%OW='二十'\n"),
lfmt,
file_seconds(2'000'000'000s)); // 03:33:20 UTC on Wednesday, 18 May 2033
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -438,7 +448,7 @@ static void test_valid_values_iso_8601_week() {
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%g='70'\t%G='1970'\t%V='01'\t%OV='01'\n"),
lfmt,
@@ -448,7 +458,7 @@ static void test_valid_values_iso_8601_week() {
SV("%g='09'\t%G='2009'\t%V='07'\t%OV='07'\n"),
lfmt,
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%g='70'\t%G='1970'\t%V='01'\t%OV='一'\n"),
lfmt,
@@ -458,7 +468,7 @@ static void test_valid_values_iso_8601_week() {
SV("%g='09'\t%G='2009'\t%V='07'\t%OV='七'\n"),
lfmt,
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -483,7 +493,7 @@ static void test_valid_values_date() {
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
// Use the global locale (fr_FR)
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
check(SV("%D='01/01/70'\t%F='1970-01-01'\t%x='01.01.1970'\t%Ex='01.01.1970'\n"),
lfmt,
file_seconds(0s)); // 00:00:00 UTC Thursday, 1 January 1970
@@ -502,7 +512,7 @@ static void test_valid_values_date() {
#endif
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%D='01/01/70'\t%F='1970-01-01'\t%x='1970/01/01'\t%Ex='1970/01/01'\n"),
lfmt,
@@ -512,7 +522,7 @@ static void test_valid_values_date() {
SV("%D='02/13/09'\t%F='2009-02-13'\t%x='2009/02/13'\t%Ex='2009/02/13'\n"),
lfmt,
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%D='01/01/70'\t%F='1970-01-01'\t%x='1970年01月01日'\t%Ex='昭和45年01月01日'\n"),
lfmt,
@@ -522,7 +532,7 @@ static void test_valid_values_date() {
SV("%D='02/13/09'\t%F='2009-02-13'\t%x='2009年02月13日'\t%Ex='平成21年02月13日'\n"),
lfmt,
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -626,7 +636,7 @@ static void test_valid_values_time() {
"%r='00:00:00'\t"
#elif defined(_AIX)
"%r='12:00:00 AM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#else
"%r='12:00:00 '\t"
@@ -656,7 +666,7 @@ static void test_valid_values_time() {
"%r='23:31:30'\t"
#elif defined(_AIX)
"%r='11:31:30 PM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#elif defined(_WIN32)
"%r='23:31:30 '\t"
@@ -671,7 +681,7 @@ static void test_valid_values_time() {
1'234'567'890'123ms)); // 23:31:30 UTC on Friday, 13 February 2009
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.a
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
check(loc,
SV("%H='00'\t"
"%OH='00'\t"
@@ -688,8 +698,12 @@ static void test_valid_values_time() {
# endif
"%R='00:00'\t"
"%T='00:00:00'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='12:00:00 AM'\t"
+# else
+ "%r='12:00:00 午前'\t"
+# endif
"%X='00時00分00秒'\t"
"%EX='00時00分00秒'\t"
# elif defined(_WIN32)
@@ -721,8 +735,12 @@ static void test_valid_values_time() {
# endif
"%R='23:31'\t"
"%T='23:31:30.123'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='11:31:30 PM'\t"
+# else
+ "%r='11:31:30 午後'\t"
+# endif
"%X='23時31分30秒'\t"
"%EX='23時31分30秒'\t"
# elif defined(_WIN32)
@@ -737,7 +755,7 @@ static void test_valid_values_time() {
"\n"),
lfmt,
std::chrono::hh_mm_ss(23h + 31min + 30s + 123ms));
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
check(loc,
SV("%H='00'\t"
"%OH='〇'\t"
@@ -776,7 +794,7 @@ static void test_valid_values_time() {
lfmt,
std::chrono::sys_time<std::chrono::milliseconds>(
1'234'567'890'123ms)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -811,6 +829,8 @@ static void test_valid_values_date_time() {
SV("%c='Jeu 1 jan 00:00:00 1970'\t%Ec='Jeu 1 jan 00:00:00 1970'\n"),
#elif defined(_WIN32)
SV("%c='01/01/1970 00:00:00'\t%Ec='01/01/1970 00:00:00'\n"),
+#elif defined(__FreeBSD__)
+ SV("%c='jeu. 1 janv. 00:00:00 1970'\t%Ec='jeu. 1 janv. 00:00:00 1970'\n"),
#else
SV("%c='jeu. 01 janv. 1970 00:00:00'\t%Ec='jeu. 01 janv. 1970 00:00:00'\n"),
#endif
@@ -827,6 +847,8 @@ static void test_valid_values_date_time() {
SV("%c='Ven 13 fév 23:31:30 2009'\t%Ec='Ven 13 fév 23:31:30 2009'\n"),
#elif defined(_WIN32)
SV("%c='13/02/2009 23:31:30'\t%Ec='13/02/2009 23:31:30'\n"),
+#elif defined(__FreeBSD__)
+ SV("%c='ven. 13 févr. 23:31:30 2009'\t%Ec='ven. 13 févr. 23:31:30 2009'\n"),
#else
SV("%c='ven. 13 févr. 2009 23:31:30'\t%Ec='ven. 13 févr. 2009 23:31:30'\n"),
#endif
@@ -834,7 +856,7 @@ static void test_valid_values_date_time() {
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.a
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
check(loc,
SV("%c='木 1/ 1 00:00:00 1970'\t%Ec='木 1/ 1 00:00:00 1970'\n"),
lfmt,
@@ -843,7 +865,7 @@ static void test_valid_values_date_time() {
SV("%c='金 2/13 23:31:30 2009'\t%Ec='金 2/13 23:31:30 2009'\n"),
lfmt,
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#elif defined(_AIX) // __APPLE__
+#elif defined(_AIX) // defined(__APPLE__)|| defined(__FreeBSD__)
check(loc,
SV("%c='1970年01月 1日 00:00:00 UTC'\t%Ec='1970年01月 1日 00:00:00 UTC'\n"),
lfmt,
@@ -852,7 +874,7 @@ static void test_valid_values_date_time() {
SV("%c='2009年02月13日 23:31:30 UTC'\t%Ec='2009年02月13日 23:31:30 UTC'\n"),
lfmt,
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#elif defined(_WIN32) // __APPLE__
+#elif defined(_WIN32) // defined(__APPLE__)|| defined(__FreeBSD__)
check(loc,
SV("%c='1970/01/01 0:00:00'\t%Ec='1970/01/01 0:00:00'\n"),
lfmt,
@@ -861,7 +883,7 @@ static void test_valid_values_date_time() {
SV("%c='2009/02/13 23:31:30'\t%Ec='2009/02/13 23:31:30'\n"),
lfmt,
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#else // __APPLE__
+#else // defined(__APPLE__)|| defined(__FreeBSD__)
check(loc,
SV("%c='1970年01月01日 00時00分00秒'\t%Ec='昭和45年01月01日 00時00分00秒'\n"),
lfmt,
@@ -871,7 +893,7 @@ static void test_valid_values_date_time() {
SV("%c='2009年02月13日 23時31分30秒'\t%Ec='平成21年02月13日 23時31分30秒'\n"),
lfmt,
file_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // __APPLE__
+#endif // defined(__APPLE__)|| defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -920,10 +942,17 @@ static void test_valid_values_time_zone() {
file_seconds(0s)); // 00:00:00 UTC Thursday, 1 January 1970
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.a
+# if defined(__FreeBSD__)
+ check(loc,
+ SV("%z='+0000'\t%Ez='+0000'\t%Oz='+0000'\t%Z='UTC'\n"),
+ lfmt,
+ file_seconds(0s)); // 00:00:00 UTC Thursday, 1 January 1970
+# else
check(loc,
SV("%z='+0000'\t%Ez='+0000'\t%Oz='+〇'\t%Z='UTC'\n"),
lfmt,
file_seconds(0s)); // 00:00:00 UTC Thursday, 1 January 1970
+# endif
# endif // defined(_AIX)
std::locale::global(std::locale::classic());
#endif // !defined(__APPLE__) && !defined(_WIN32)
diff --git a/libcxx/test/std/time/time.syn/formatter.hh_mm_ss.pass.cpp b/libcxx/test/std/time/time.syn/formatter.hh_mm_ss.pass.cpp
index d26408dd2b3478..b4127af511b583 100644
--- a/libcxx/test/std/time/time.syn/formatter.hh_mm_ss.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.hh_mm_ss.pass.cpp
@@ -9,8 +9,6 @@
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// XFAIL: availability-fp_to_chars-missing
// REQUIRES: locale.fr_FR.UTF-8
@@ -188,7 +186,7 @@ static void test_valid_values() {
"%r='00:00:00'\t"
#elif defined(_AIX)
"%r='12:00:00 AM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#else
"%r='12:00:00 '\t"
@@ -218,7 +216,7 @@ static void test_valid_values() {
"%r='23:31:30'\t"
#elif defined(_AIX)
"%r='11:31:30 PM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#else
"%r='11:31:30 '\t"
@@ -248,7 +246,7 @@ static void test_valid_values() {
"%r='03:02:01'\t"
#elif defined(_AIX)
"%r='03:02:01 AM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#else
"%r='03:02:01 '\t"
@@ -278,7 +276,7 @@ static void test_valid_values() {
"%r='01:01:01'\t"
#elif defined(_AIX)
"%r='01:01:01 AM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#else
"%r='01:01:01 '\t"
@@ -290,7 +288,7 @@ static void test_valid_values() {
std::chrono::hh_mm_ss(std::chrono::duration<double>(3661.123456)));
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
check(loc,
SV("%H='00'\t"
"%OH='00'\t"
@@ -307,8 +305,12 @@ static void test_valid_values() {
# endif
"%R='00:00'\t"
"%T='00:00:00'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='12:00:00 AM'\t"
+# else
+ "%r='12:00:00 午前'\t"
+# endif
"%X='00時00分00秒'\t"
"%EX='00時00分00秒'\t"
# elif defined(_WIN32)
@@ -340,8 +342,12 @@ static void test_valid_values() {
# endif
"%R='23:31'\t"
"%T='23:31:30.123'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='11:31:30 PM'\t"
+# else
+ "%r='11:31:30 午後'\t"
+# endif
"%X='23時31分30秒'\t"
"%EX='23時31分30秒'\t"
# elif defined(_WIN32)
@@ -373,8 +379,12 @@ static void test_valid_values() {
# endif
"%R='03:02'\t"
"%T='03:02:01.123456789012'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='03:02:01 AM'\t"
+# else
+ "%r='03:02:01 午前'\t"
+# endif
"%X='03時02分01秒'\t"
"%EX='03時02分01秒'\t"
# elif defined(_WIN32)
@@ -406,8 +416,12 @@ static void test_valid_values() {
# endif
"%R='01:01'\t"
"%T='01:01:01'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='01:01:01 AM'\t"
+# else
+ "%r='01:01:01 午前'\t"
+# endif
"%X='01時01分01秒'\t"
"%EX='01時01分01秒'\t"
# elif defined(_WIN32)
diff --git a/libcxx/test/std/time/time.syn/formatter.local_time.pass.cpp b/libcxx/test/std/time/time.syn/formatter.local_time.pass.cpp
index 4535a197781463..71dd7fba9fb701 100644
--- a/libcxx/test/std/time/time.syn/formatter.local_time.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.local_time.pass.cpp
@@ -9,8 +9,6 @@
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// TODO FMT This test should not require std::to_chars(floating-point)
// XFAIL: availability-fp_to_chars-missing
@@ -103,7 +101,7 @@ static void test_valid_values_year() {
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%C='19'\t%EC='19'\t%y='70'\t%Oy='70'\t%Ey='70'\t%Y='1970'\t%EY='1970'\n"),
lfmt,
@@ -113,7 +111,7 @@ static void test_valid_values_year() {
SV("%C='20'\t%EC='20'\t%y='09'\t%Oy='09'\t%Ey='09'\t%Y='2009'\t%EY='2009'\n"),
lfmt,
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)||defined(__FreeBSD__)
check(loc,
SV("%C='19'\t%EC='昭和'\t%y='70'\t%Oy='七十'\t%Ey='45'\t%Y='1970'\t%EY='昭和45年'\n"),
lfmt,
@@ -123,7 +121,7 @@ static void test_valid_values_year() {
SV("%C='20'\t%EC='平成'\t%y='09'\t%Oy='九'\t%Ey='21'\t%Y='2009'\t%EY='平成21年'\n"),
lfmt,
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)||defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -193,6 +191,16 @@ static void test_valid_values_month() {
SV("%b=' 5'\t%h=' 5'\t%B='5月'\t%m='05'\t%Om='05'\n"),
lfmt,
std::chrono::local_seconds(2'000'000'000s)); // 03:33:20 UTC on Wednesday, 18 May 2033
+#elif defined(__FreeBSD__) // _WIN32
+ check(loc,
+ SV("%b=' 1月'\t%h=' 1月'\t%B='1月'\t%m='01'\t%Om='01'\n"),
+ lfmt,
+ std::chrono::local_seconds(0s)); // 00:00:00 UTC Thursday, 1 January 1970
+
+ check(loc,
+ SV("%b=' 5月'\t%h=' 5月'\t%B='5月'\t%m='05'\t%Om='05'\n"),
+ lfmt,
+ std::chrono::local_seconds(2'000'000'000s)); // 03:33:20 UTC on Wednesday, 18 May 2033
#else // _WIN32
check(loc,
SV("%b=' 1月'\t%h=' 1月'\t%B='1月'\t%m='01'\t%Om='一'\n"),
@@ -237,7 +245,7 @@ static void test_valid_values_day() {
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%d='01'\t%Od='01'\t%e=' 1'\t%Oe=' 1'\n"),
lfmt,
@@ -247,7 +255,7 @@ static void test_valid_values_day() {
SV("%d='13'\t%Od='13'\t%e='13'\t%Oe='13'\n"),
lfmt,
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#else // _WIN32
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%d='01'\t%Od='一'\t%e=' 1'\t%Oe='一'\n"),
lfmt,
@@ -258,7 +266,7 @@ static void test_valid_values_day() {
lfmt,
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // _WIN32
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -305,7 +313,7 @@ static void test_valid_values_weekday() {
// Use supplied locale (ja_JP).
// This locale has a
diff erent alternate, but not on all platforms
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%a='木'\t%A='木曜日'\t%u='4'\t%Ou='4'\t%w='4'\t%Ow='4'\n"),
lfmt,
@@ -315,7 +323,7 @@ static void test_valid_values_weekday() {
SV("%a='日'\t%A='日曜日'\t%u='7'\t%Ou='7'\t%w='0'\t%Ow='0'\n"),
lfmt,
std::chrono::local_seconds(4'294'967'295s)); // 06:28:15 UTC on Sunday, 7 February 2106
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%a='木'\t%A='木曜日'\t%u='4'\t%Ou='四'\t%w='4'\t%Ow='四'\n"),
lfmt,
@@ -325,7 +333,7 @@ static void test_valid_values_weekday() {
SV("%a='日'\t%A='日曜日'\t%u='7'\t%Ou='七'\t%w='0'\t%Ow='〇'\n"),
lfmt,
std::chrono::local_seconds(4'294'967'295s)); // 06:28:15 UTC on Sunday, 7 February 2106
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -388,7 +396,7 @@ static void test_valid_values_week() {
std::chrono::local_seconds(2'000'000'000s)); // 03:33:20 UTC on Wednesday, 18 May 2033
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%U='00'\t%OU='00'\t%W='00'\t%OW='00'\n"),
lfmt,
@@ -398,7 +406,7 @@ static void test_valid_values_week() {
SV("%U='20'\t%OU='20'\t%W='20'\t%OW='20'\n"),
lfmt,
std::chrono::local_seconds(2'000'000'000s)); // 03:33:20 UTC on Wednesday, 18 May 2033
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%U='00'\t%OU='〇'\t%W='00'\t%OW='〇'\n"),
lfmt,
@@ -408,7 +416,7 @@ static void test_valid_values_week() {
SV("%U='20'\t%OU='二十'\t%W='20'\t%OW='二十'\n"),
lfmt,
std::chrono::local_seconds(2'000'000'000s)); // 03:33:20 UTC on Wednesday, 18 May 2033
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -441,7 +449,7 @@ static void test_valid_values_iso_8601_week() {
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%g='70'\t%G='1970'\t%V='01'\t%OV='01'\n"),
lfmt,
@@ -451,7 +459,7 @@ static void test_valid_values_iso_8601_week() {
SV("%g='09'\t%G='2009'\t%V='07'\t%OV='07'\n"),
lfmt,
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%g='70'\t%G='1970'\t%V='01'\t%OV='一'\n"),
lfmt,
@@ -461,7 +469,7 @@ static void test_valid_values_iso_8601_week() {
SV("%g='09'\t%G='2009'\t%V='07'\t%OV='七'\n"),
lfmt,
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -486,7 +494,7 @@ static void test_valid_values_date() {
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
// Use the global locale (fr_FR)
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
check(SV("%D='01/01/70'\t%F='1970-01-01'\t%x='01.01.1970'\t%Ex='01.01.1970'\n"),
lfmt,
std::chrono::local_seconds(0s)); // 00:00:00 UTC Thursday, 1 January 1970
@@ -505,7 +513,7 @@ static void test_valid_values_date() {
#endif
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%D='01/01/70'\t%F='1970-01-01'\t%x='1970/01/01'\t%Ex='1970/01/01'\n"),
lfmt,
@@ -515,7 +523,7 @@ static void test_valid_values_date() {
SV("%D='02/13/09'\t%F='2009-02-13'\t%x='2009/02/13'\t%Ex='2009/02/13'\n"),
lfmt,
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%D='01/01/70'\t%F='1970-01-01'\t%x='1970年01月01日'\t%Ex='昭和45年01月01日'\n"),
lfmt,
@@ -525,7 +533,7 @@ static void test_valid_values_date() {
SV("%D='02/13/09'\t%F='2009-02-13'\t%x='2009年02月13日'\t%Ex='平成21年02月13日'\n"),
lfmt,
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -629,7 +637,7 @@ static void test_valid_values_time() {
"%r='00:00:00'\t"
#elif defined(_AIX)
"%r='12:00:00 AM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#else
"%r='12:00:00 '\t"
@@ -659,7 +667,7 @@ static void test_valid_values_time() {
"%r='23:31:30'\t"
#elif defined(_AIX)
"%r='11:31:30 PM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#else
"%r='11:31:30 '\t"
@@ -672,7 +680,7 @@ static void test_valid_values_time() {
1'234'567'890'123ms)); // 23:31:30 UTC on Friday, 13 February 2009
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.a
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
check(loc,
SV("%H='00'\t"
"%OH='00'\t"
@@ -689,8 +697,12 @@ static void test_valid_values_time() {
# endif
"%R='00:00'\t"
"%T='00:00:00'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='12:00:00 AM'\t"
+# else
+ "%r='12:00:00 午前'\t"
+# endif
"%X='00時00分00秒'\t"
"%EX='00時00分00秒'\t"
# elif defined(_WIN32)
@@ -722,8 +734,12 @@ static void test_valid_values_time() {
# endif
"%R='23:31'\t"
"%T='23:31:30.123'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='11:31:30 PM'\t"
+# else
+ "%r='11:31:30 午後'\t"
+# endif
"%X='23時31分30秒'\t"
"%EX='23時31分30秒'\t"
# elif defined(_WIN32)
@@ -738,7 +754,7 @@ static void test_valid_values_time() {
"\n"),
lfmt,
std::chrono::hh_mm_ss(23h + 31min + 30s + 123ms));
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
check(loc,
SV("%H='00'\t"
"%OH='〇'\t"
@@ -777,7 +793,7 @@ static void test_valid_values_time() {
lfmt,
std::chrono::local_time<std::chrono::milliseconds>(
1'234'567'890'123ms)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -812,6 +828,8 @@ static void test_valid_values_date_time() {
SV("%c='Jeu 1 jan 00:00:00 1970'\t%Ec='Jeu 1 jan 00:00:00 1970'\n"),
#elif defined(_WIN32)
SV("%c='01/01/1970 00:00:00'\t%Ec='01/01/1970 00:00:00'\n"),
+#elif defined(__FreeBSD__)
+ SV("%c='jeu. 1 janv. 00:00:00 1970'\t%Ec='jeu. 1 janv. 00:00:00 1970'\n"),
#else
SV("%c='jeu. 01 janv. 1970 00:00:00'\t%Ec='jeu. 01 janv. 1970 00:00:00'\n"),
#endif
@@ -828,6 +846,8 @@ static void test_valid_values_date_time() {
SV("%c='Ven 13 fév 23:31:30 2009'\t%Ec='Ven 13 fév 23:31:30 2009'\n"),
#elif defined(_WIN32)
SV("%c='13/02/2009 23:31:30'\t%Ec='13/02/2009 23:31:30'\n"),
+#elif defined(__FreeBSD__)
+ SV("%c='ven. 13 févr. 23:31:30 2009'\t%Ec='ven. 13 févr. 23:31:30 2009'\n"),
#else
SV("%c='ven. 13 févr. 2009 23:31:30'\t%Ec='ven. 13 févr. 2009 23:31:30'\n"),
#endif
@@ -835,7 +855,7 @@ static void test_valid_values_date_time() {
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.a
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
check(loc,
SV("%c='木 1/ 1 00:00:00 1970'\t%Ec='木 1/ 1 00:00:00 1970'\n"),
lfmt,
@@ -844,7 +864,7 @@ static void test_valid_values_date_time() {
SV("%c='金 2/13 23:31:30 2009'\t%Ec='金 2/13 23:31:30 2009'\n"),
lfmt,
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#elif defined(_AIX) // __APPLE__
+#elif defined(_AIX) // defined(__APPLE__)|| defined(__FreeBSD__)
check(loc,
SV("%c='1970年01月 1日 00:00:00 UTC'\t%Ec='1970年01月 1日 00:00:00 UTC'\n"),
lfmt,
@@ -853,7 +873,7 @@ static void test_valid_values_date_time() {
SV("%c='2009年02月13日 23:31:30 UTC'\t%Ec='2009年02月13日 23:31:30 UTC'\n"),
lfmt,
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#elif defined(_WIN32) // __APPLE__
+#elif defined(_WIN32) // defined(__APPLE__)|| defined(__FreeBSD__)
check(loc,
SV("%c='1970/01/01 0:00:00'\t%Ec='1970/01/01 0:00:00'\n"),
lfmt,
@@ -862,7 +882,7 @@ static void test_valid_values_date_time() {
SV("%c='2009/02/13 23:31:30'\t%Ec='2009/02/13 23:31:30'\n"),
lfmt,
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#else // __APPLE__
+#else // defined(__APPLE__)|| defined(__FreeBSD__)
check(loc,
SV("%c='1970年01月01日 00時00分00秒'\t%Ec='昭和45年01月01日 00時00分00秒'\n"),
lfmt,
@@ -872,7 +892,7 @@ static void test_valid_values_date_time() {
SV("%c='2009年02月13日 23時31分30秒'\t%Ec='平成21年02月13日 23時31分30秒'\n"),
lfmt,
std::chrono::local_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // __APPLE__
+#endif // defined(__APPLE__)|| defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
diff --git a/libcxx/test/std/time/time.syn/formatter.month.pass.cpp b/libcxx/test/std/time/time.syn/formatter.month.pass.cpp
index de8faeb707c605..6e73638408a2cf 100644
--- a/libcxx/test/std/time/time.syn/formatter.month.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.month.pass.cpp
@@ -5,8 +5,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -101,7 +99,7 @@ static void test_valid_values() {
check(SV("%b='janv.'\t%B='janvier'\t%h='janv.'\t%m='01'\t%Om='01'\n"), lfmt, std::chrono::January);
check(SV("%b='févr.'\t%B='février'\t%h='févr.'\t%m='02'\t%Om='02'\n"), lfmt, std::chrono::February);
check(SV("%b='mars'\t%B='mars'\t%h='mars'\t%m='03'\t%Om='03'\n"), lfmt, std::chrono::March);
-# if defined(_WIN32) || defined(_AIX)
+# if defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
check(SV("%b='avr.'\t%B='avril'\t%h='avr.'\t%m='04'\t%Om='04'\n"), lfmt, std::chrono::April);
# else
check(SV("%b='avril'\t%B='avril'\t%h='avril'\t%m='04'\t%Om='04'\n"), lfmt, std::chrono::April);
@@ -143,6 +141,19 @@ static void test_valid_values() {
check(loc, SV("%b='10月'\t%B='10月'\t%h='10月'\t%m='10'\t%Om='10'\n"), lfmt, std::chrono::October);
check(loc, SV("%b='11月'\t%B='11月'\t%h='11月'\t%m='11'\t%Om='11'\n"), lfmt, std::chrono::November);
check(loc, SV("%b='12月'\t%B='12月'\t%h='12月'\t%m='12'\t%Om='12'\n"), lfmt, std::chrono::December);
+#elif defined(__FreeBSD__) // defined(_WIN32)
+ check(loc, SV("%b=' 1月'\t%B='1月'\t%h=' 1月'\t%m='01'\t%Om='01'\n"), lfmt, std::chrono::January);
+ check(loc, SV("%b=' 2月'\t%B='2月'\t%h=' 2月'\t%m='02'\t%Om='02'\n"), lfmt, std::chrono::February);
+ check(loc, SV("%b=' 3月'\t%B='3月'\t%h=' 3月'\t%m='03'\t%Om='03'\n"), lfmt, std::chrono::March);
+ check(loc, SV("%b=' 4月'\t%B='4月'\t%h=' 4月'\t%m='04'\t%Om='04'\n"), lfmt, std::chrono::April);
+ check(loc, SV("%b=' 5月'\t%B='5月'\t%h=' 5月'\t%m='05'\t%Om='05'\n"), lfmt, std::chrono::May);
+ check(loc, SV("%b=' 6月'\t%B='6月'\t%h=' 6月'\t%m='06'\t%Om='06'\n"), lfmt, std::chrono::June);
+ check(loc, SV("%b=' 7月'\t%B='7月'\t%h=' 7月'\t%m='07'\t%Om='07'\n"), lfmt, std::chrono::July);
+ check(loc, SV("%b=' 8月'\t%B='8月'\t%h=' 8月'\t%m='08'\t%Om='08'\n"), lfmt, std::chrono::August);
+ check(loc, SV("%b=' 9月'\t%B='9月'\t%h=' 9月'\t%m='09'\t%Om='09'\n"), lfmt, std::chrono::September);
+ check(loc, SV("%b='10月'\t%B='10月'\t%h='10月'\t%m='10'\t%Om='10'\n"), lfmt, std::chrono::October);
+ check(loc, SV("%b='11月'\t%B='11月'\t%h='11月'\t%m='11'\t%Om='11'\n"), lfmt, std::chrono::November);
+ check(loc, SV("%b='12月'\t%B='12月'\t%h='12月'\t%m='12'\t%Om='12'\n"), lfmt, std::chrono::December);
#elif defined(__APPLE__) // defined(_WIN32)
check(loc, SV("%b=' 1'\t%B='1月'\t%h=' 1'\t%m='01'\t%Om='01'\n"), lfmt, std::chrono::January);
check(loc, SV("%b=' 2'\t%B='2月'\t%h=' 2'\t%m='02'\t%Om='02'\n"), lfmt, std::chrono::February);
diff --git a/libcxx/test/std/time/time.syn/formatter.month_day.pass.cpp b/libcxx/test/std/time/time.syn/formatter.month_day.pass.cpp
index 849de0f803654f..746554d9683112 100644
--- a/libcxx/test/std/time/time.syn/formatter.month_day.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.month_day.pass.cpp
@@ -5,8 +5,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -234,11 +232,11 @@ static void test_valid_values() {
lfmt,
std::chrono::month_day{std::chrono::March, std::chrono::day{9}});
check(
-# if defined(_WIN32) || defined(_AIX)
+# if defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
SV("%b='avr.'\t%B='avril'\t%h='avr.'\t%m='04'\t%Om='04'\t%d='10'\t%e='10'\t%Od='10'\t%Oe='10'\n"),
-# else // defined(_WIN32) || defined(_AIX)
+# else // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
SV("%b='avril'\t%B='avril'\t%h='avril'\t%m='04'\t%Om='04'\t%d='10'\t%e='10'\t%Od='10'\t%Oe='10'\n"),
-# endif // defined(_WIN32) || defined(_AIX)
+# endif // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
lfmt,
std::chrono::month_day{std::chrono::April, std::chrono::day{10}});
check(SV("%b='mai'\t%B='mai'\t%h='mai'\t%m='05'\t%Om='05'\t%d='28'\t%e='28'\t%Od='28'\t%Oe='28'\n"),
@@ -390,6 +388,55 @@ static void test_valid_values() {
SV("%b='12月'\t%B='12月'\t%h='12月'\t%m='12'\t%Om='12'\t%d='55'\t%e='55'\t%Od='55'\t%Oe='55'\n"),
lfmt,
std::chrono::month_day{std::chrono::December, std::chrono::day{255}});
+#elif defined(__FreeBSD__) // defined(_WIN32)
+ check(loc,
+ SV("%b=' 1月'\t%B='1月'\t%h=' 1月'\t%m='01'\t%Om='01'\t%d='00'\t%e=' 0'\t%Od='00'\t%Oe=' 0'\n"),
+ lfmt,
+ std::chrono::month_day{std::chrono::January, std::chrono::day{0}});
+ check(loc,
+ SV("%b=' 2月'\t%B='2月'\t%h=' 2月'\t%m='02'\t%Om='02'\t%d='01'\t%e=' 1'\t%Od='01'\t%Oe=' 1'\n"),
+ lfmt,
+ std::chrono::month_day{std::chrono::February, std::chrono::day{1}});
+ check(loc,
+ SV("%b=' 3月'\t%B='3月'\t%h=' 3月'\t%m='03'\t%Om='03'\t%d='09'\t%e=' 9'\t%Od='09'\t%Oe=' 9'\n"),
+ lfmt,
+ std::chrono::month_day{std::chrono::March, std::chrono::day{9}});
+ check(loc,
+ SV("%b=' 4月'\t%B='4月'\t%h=' 4月'\t%m='04'\t%Om='04'\t%d='10'\t%e='10'\t%Od='10'\t%Oe='10'\n"),
+ lfmt,
+ std::chrono::month_day{std::chrono::April, std::chrono::day{10}});
+ check(loc,
+ SV("%b=' 5月'\t%B='5月'\t%h=' 5月'\t%m='05'\t%Om='05'\t%d='28'\t%e='28'\t%Od='28'\t%Oe='28'\n"),
+ lfmt,
+ std::chrono::month_day{std::chrono::May, std::chrono::day{28}});
+ check(loc,
+ SV("%b=' 6月'\t%B='6月'\t%h=' 6月'\t%m='06'\t%Om='06'\t%d='29'\t%e='29'\t%Od='29'\t%Oe='29'\n"),
+ lfmt,
+ std::chrono::month_day{std::chrono::June, std::chrono::day{29}});
+ check(loc,
+ SV("%b=' 7月'\t%B='7月'\t%h=' 7月'\t%m='07'\t%Om='07'\t%d='30'\t%e='30'\t%Od='30'\t%Oe='30'\n"),
+ lfmt,
+ std::chrono::month_day{std::chrono::July, std::chrono::day{30}});
+ check(loc,
+ SV("%b=' 8月'\t%B='8月'\t%h=' 8月'\t%m='08'\t%Om='08'\t%d='31'\t%e='31'\t%Od='31'\t%Oe='31'\n"),
+ lfmt,
+ std::chrono::month_day{std::chrono::August, std::chrono::day{31}});
+ check(loc,
+ SV("%b=' 9月'\t%B='9月'\t%h=' 9月'\t%m='09'\t%Om='09'\t%d='32'\t%e='32'\t%Od='32'\t%Oe='32'\n"),
+ lfmt,
+ std::chrono::month_day{std::chrono::September, std::chrono::day{32}});
+ check(loc,
+ SV("%b='10月'\t%B='10月'\t%h='10月'\t%m='10'\t%Om='10'\t%d='99'\t%e='99'\t%Od='99'\t%Oe='99'\n"),
+ lfmt,
+ std::chrono::month_day{std::chrono::October, std::chrono::day{99}});
+ check(loc,
+ SV("%b='11月'\t%B='11月'\t%h='11月'\t%m='11'\t%Om='11'\t%d='100'\t%e='100'\t%Od='100'\t%Oe='100'\n"),
+ lfmt,
+ std::chrono::month_day{std::chrono::November, std::chrono::day{100}});
+ check(loc,
+ SV("%b='12月'\t%B='12月'\t%h='12月'\t%m='12'\t%Om='12'\t%d='255'\t%e='255'\t%Od='255'\t%Oe='255'\n"),
+ lfmt,
+ std::chrono::month_day{std::chrono::December, std::chrono::day{255}});
#elif defined(__APPLE__) // defined(_WIN32)
check(loc,
SV("%b=' 1'\t%B='1月'\t%h=' 1'\t%m='01'\t%Om='01'\t%d='00'\t%e=' 0'\t%Od='00'\t%Oe=' 0'\n"),
diff --git a/libcxx/test/std/time/time.syn/formatter.month_day_last.pass.cpp b/libcxx/test/std/time/time.syn/formatter.month_day_last.pass.cpp
index 7de230914d52a0..f29ccea4143055 100644
--- a/libcxx/test/std/time/time.syn/formatter.month_day_last.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.month_day_last.pass.cpp
@@ -5,8 +5,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -159,11 +157,11 @@ static void test_valid_values() {
lfmt,
std::chrono::month_day_last{std::chrono::March});
check(
-# if defined(_WIN32) || defined(_AIX)
+# if defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
SV("%b='avr.'\t%B='avril'\t%h='avr.'\t%m='04'\t%Om='04'\n"),
-# else // defined(_WIN32) || defined(_AIX)
+# else // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
SV("%b='avril'\t%B='avril'\t%h='avril'\t%m='04'\t%Om='04'\n"),
-# endif // defined(_WIN32) || defined(_AIX)
+# endif // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
lfmt,
std::chrono::month_day_last{std::chrono::April});
check(SV("%b='mai'\t%B='mai'\t%h='mai'\t%m='05'\t%Om='05'\n"), lfmt, std::chrono::month_day_last{std::chrono::May});
@@ -316,6 +314,55 @@ static void test_valid_values() {
SV("%b='12月'\t%B='12月'\t%h='12月'\t%m='12'\t%Om='12'\n"),
lfmt,
std::chrono::month_day_last{std::chrono::December});
+#elif defined(__FreeBSD__) // defined(_WIN32)
+ check(loc,
+ SV("%b=' 1月'\t%B='1月'\t%h=' 1月'\t%m='01'\t%Om='01'\n"),
+ lfmt,
+ std::chrono::month_day_last{std::chrono::January});
+ check(loc,
+ SV("%b=' 2月'\t%B='2月'\t%h=' 2月'\t%m='02'\t%Om='02'\n"),
+ lfmt,
+ std::chrono::month_day_last{std::chrono::February});
+ check(loc,
+ SV("%b=' 3月'\t%B='3月'\t%h=' 3月'\t%m='03'\t%Om='03'\n"),
+ lfmt,
+ std::chrono::month_day_last{std::chrono::March});
+ check(loc,
+ SV("%b=' 4月'\t%B='4月'\t%h=' 4月'\t%m='04'\t%Om='04'\n"),
+ lfmt,
+ std::chrono::month_day_last{std::chrono::April});
+ check(loc,
+ SV("%b=' 5月'\t%B='5月'\t%h=' 5月'\t%m='05'\t%Om='05'\n"),
+ lfmt,
+ std::chrono::month_day_last{std::chrono::May});
+ check(loc,
+ SV("%b=' 6月'\t%B='6月'\t%h=' 6月'\t%m='06'\t%Om='06'\n"),
+ lfmt,
+ std::chrono::month_day_last{std::chrono::June});
+ check(loc,
+ SV("%b=' 7月'\t%B='7月'\t%h=' 7月'\t%m='07'\t%Om='07'\n"),
+ lfmt,
+ std::chrono::month_day_last{std::chrono::July});
+ check(loc,
+ SV("%b=' 8月'\t%B='8月'\t%h=' 8月'\t%m='08'\t%Om='08'\n"),
+ lfmt,
+ std::chrono::month_day_last{std::chrono::August});
+ check(loc,
+ SV("%b=' 9月'\t%B='9月'\t%h=' 9月'\t%m='09'\t%Om='09'\n"),
+ lfmt,
+ std::chrono::month_day_last{std::chrono::September});
+ check(loc,
+ SV("%b='10月'\t%B='10月'\t%h='10月'\t%m='10'\t%Om='10'\n"),
+ lfmt,
+ std::chrono::month_day_last{std::chrono::October});
+ check(loc,
+ SV("%b='11月'\t%B='11月'\t%h='11月'\t%m='11'\t%Om='11'\n"),
+ lfmt,
+ std::chrono::month_day_last{std::chrono::November});
+ check(loc,
+ SV("%b='12月'\t%B='12月'\t%h='12月'\t%m='12'\t%Om='12'\n"),
+ lfmt,
+ std::chrono::month_day_last{std::chrono::December});
#else // defined(_WIN32)
check(loc,
SV("%b=' 1月'\t%B='1月'\t%h=' 1月'\t%m='01'\t%Om='一'\n"),
diff --git a/libcxx/test/std/time/time.syn/formatter.month_weekday.pass.cpp b/libcxx/test/std/time/time.syn/formatter.month_weekday.pass.cpp
index ef127f010c8223..f2a73c5c25f916 100644
--- a/libcxx/test/std/time/time.syn/formatter.month_weekday.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.month_weekday.pass.cpp
@@ -5,8 +5,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -272,11 +270,11 @@ static void test_valid_month() {
lfmt,
std::chrono::month_weekday{std::chrono::March, std::chrono::weekday_indexed{std::chrono::weekday{0}, 1}});
check(
-# if defined(_WIN32) || defined(_AIX)
+# if defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
SV("%b='avr.'\t%B='avril'\t%h='avr.'\t%m='04'\t%Om='04'\n"),
-# else // defined(_WIN32) || defined(_AIX)
+# else // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
SV("%b='avril'\t%B='avril'\t%h='avril'\t%m='04'\t%Om='04'\n"),
-# endif // defined(_WIN32) || defined(_AIX)
+# endif // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
lfmt,
std::chrono::month_weekday{std::chrono::April, std::chrono::weekday_indexed{std::chrono::weekday{0}, 1}});
check(SV("%b='mai'\t%B='mai'\t%h='mai'\t%m='05'\t%Om='05'\n"),
@@ -453,6 +451,55 @@ static void test_valid_month() {
SV("%b='12月'\t%B='12月'\t%h='12月'\t%m='12'\t%Om='12'\n"),
lfmt,
std::chrono::month_weekday{std::chrono::December, std::chrono::weekday_indexed{std::chrono::weekday{0}, 1}});
+#elif defined(__FreeBSD__) // _WIN32
+ check(loc,
+ SV("%b=' 1月'\t%B='1月'\t%h=' 1月'\t%m='01'\t%Om='01'\n"),
+ lfmt,
+ std::chrono::month_weekday{std::chrono::January, std::chrono::weekday_indexed{std::chrono::weekday{0}, 1}});
+ check(loc,
+ SV("%b=' 2月'\t%B='2月'\t%h=' 2月'\t%m='02'\t%Om='02'\n"),
+ lfmt,
+ std::chrono::month_weekday{std::chrono::February, std::chrono::weekday_indexed{std::chrono::weekday{0}, 1}});
+ check(loc,
+ SV("%b=' 3月'\t%B='3月'\t%h=' 3月'\t%m='03'\t%Om='03'\n"),
+ lfmt,
+ std::chrono::month_weekday{std::chrono::March, std::chrono::weekday_indexed{std::chrono::weekday{0}, 1}});
+ check(loc,
+ SV("%b=' 4月'\t%B='4月'\t%h=' 4月'\t%m='04'\t%Om='04'\n"),
+ lfmt,
+ std::chrono::month_weekday{std::chrono::April, std::chrono::weekday_indexed{std::chrono::weekday{0}, 1}});
+ check(loc,
+ SV("%b=' 5月'\t%B='5月'\t%h=' 5月'\t%m='05'\t%Om='05'\n"),
+ lfmt,
+ std::chrono::month_weekday{std::chrono::May, std::chrono::weekday_indexed{std::chrono::weekday{0}, 1}});
+ check(loc,
+ SV("%b=' 6月'\t%B='6月'\t%h=' 6月'\t%m='06'\t%Om='06'\n"),
+ lfmt,
+ std::chrono::month_weekday{std::chrono::June, std::chrono::weekday_indexed{std::chrono::weekday{0}, 1}});
+ check(loc,
+ SV("%b=' 7月'\t%B='7月'\t%h=' 7月'\t%m='07'\t%Om='07'\n"),
+ lfmt,
+ std::chrono::month_weekday{std::chrono::July, std::chrono::weekday_indexed{std::chrono::weekday{0}, 1}});
+ check(loc,
+ SV("%b=' 8月'\t%B='8月'\t%h=' 8月'\t%m='08'\t%Om='08'\n"),
+ lfmt,
+ std::chrono::month_weekday{std::chrono::August, std::chrono::weekday_indexed{std::chrono::weekday{0}, 1}});
+ check(loc,
+ SV("%b=' 9月'\t%B='9月'\t%h=' 9月'\t%m='09'\t%Om='09'\n"),
+ lfmt,
+ std::chrono::month_weekday{std::chrono::September, std::chrono::weekday_indexed{std::chrono::weekday{0}, 1}});
+ check(loc,
+ SV("%b='10月'\t%B='10月'\t%h='10月'\t%m='10'\t%Om='10'\n"),
+ lfmt,
+ std::chrono::month_weekday{std::chrono::October, std::chrono::weekday_indexed{std::chrono::weekday{0}, 1}});
+ check(loc,
+ SV("%b='11月'\t%B='11月'\t%h='11月'\t%m='11'\t%Om='11'\n"),
+ lfmt,
+ std::chrono::month_weekday{std::chrono::November, std::chrono::weekday_indexed{std::chrono::weekday{0}, 1}});
+ check(loc,
+ SV("%b='12月'\t%B='12月'\t%h='12月'\t%m='12'\t%Om='12'\n"),
+ lfmt,
+ std::chrono::month_weekday{std::chrono::December, std::chrono::weekday_indexed{std::chrono::weekday{0}, 1}});
#else // _WIN32
check(loc,
SV("%b=' 1月'\t%B='1月'\t%h=' 1月'\t%m='01'\t%Om='一'\n"),
@@ -598,7 +645,7 @@ static void test_valid_weekday() {
// Use supplied locale (ja_JP).
// This locale has a
diff erent alternate, but not on all platforms
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%u='7'\t%Ou='7'\t%w='0'\t%Ow='0'\t%a='日'\t%A='日曜日'\n"),
lfmt,
@@ -631,7 +678,7 @@ static void test_valid_weekday() {
SV("%u='7'\t%Ou='7'\t%w='0'\t%Ow='0'\t%a='日'\t%A='日曜日'\n"),
lfmt,
std::chrono::month_weekday{std::chrono::January, std::chrono::weekday_indexed{std::chrono::weekday{7}, 1}});
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%u='7'\t%Ou='七'\t%w='0'\t%Ow='〇'\t%a='日'\t%A='日曜日'\n"),
lfmt,
@@ -664,7 +711,7 @@ static void test_valid_weekday() {
SV("%u='7'\t%Ou='七'\t%w='0'\t%Ow='〇'\t%a='日'\t%A='日曜日'\n"),
lfmt,
std::chrono::month_weekday{std::chrono::January, std::chrono::weekday_indexed{std::chrono::weekday{7}, 1}});
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
diff --git a/libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp b/libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp
index 1f1cdccc2a08a3..5bce6c1187619b 100644
--- a/libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp
@@ -9,8 +9,6 @@
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// TODO FMT This test should not require std::to_chars(floating-point)
// XFAIL: availability-fp_to_chars-missing
@@ -102,7 +100,7 @@ static void test_valid_values_year() {
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%C='19'\t%EC='19'\t%y='70'\t%Oy='70'\t%Ey='70'\t%Y='1970'\t%EY='1970'\n"),
lfmt,
@@ -112,7 +110,7 @@ static void test_valid_values_year() {
SV("%C='20'\t%EC='20'\t%y='09'\t%Oy='09'\t%Ey='09'\t%Y='2009'\t%EY='2009'\n"),
lfmt,
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)||defined(__FreeBSD__)
check(loc,
SV("%C='19'\t%EC='昭和'\t%y='70'\t%Oy='七十'\t%Ey='45'\t%Y='1970'\t%EY='昭和45年'\n"),
lfmt,
@@ -122,7 +120,7 @@ static void test_valid_values_year() {
SV("%C='20'\t%EC='平成'\t%y='09'\t%Oy='九'\t%Ey='21'\t%Y='2009'\t%EY='平成21年'\n"),
lfmt,
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)||defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -192,6 +190,16 @@ static void test_valid_values_month() {
SV("%b=' 5'\t%h=' 5'\t%B='5月'\t%m='05'\t%Om='05'\n"),
lfmt,
std::chrono::sys_seconds(2'000'000'000s)); // 03:33:20 UTC on Wednesday, 18 May 2033
+#elif defined(__FreeBSD__) // _WIN32
+ check(loc,
+ SV("%b=' 1月'\t%h=' 1月'\t%B='1月'\t%m='01'\t%Om='01'\n"),
+ lfmt,
+ std::chrono::sys_seconds(0s)); // 00:00:00 UTC Thursday, 1 January 1970
+
+ check(loc,
+ SV("%b=' 5月'\t%h=' 5月'\t%B='5月'\t%m='05'\t%Om='05'\n"),
+ lfmt,
+ std::chrono::sys_seconds(2'000'000'000s)); // 03:33:20 UTC on Wednesday, 18 May 2033
#else // _WIN32
check(loc,
SV("%b=' 1月'\t%h=' 1月'\t%B='1月'\t%m='01'\t%Om='一'\n"),
@@ -236,7 +244,7 @@ static void test_valid_values_day() {
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%d='01'\t%Od='01'\t%e=' 1'\t%Oe=' 1'\n"),
lfmt,
@@ -246,7 +254,7 @@ static void test_valid_values_day() {
SV("%d='13'\t%Od='13'\t%e='13'\t%Oe='13'\n"),
lfmt,
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#else // _WIN32
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%d='01'\t%Od='一'\t%e=' 1'\t%Oe='一'\n"),
lfmt,
@@ -257,7 +265,7 @@ static void test_valid_values_day() {
lfmt,
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // _WIN32
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -304,7 +312,7 @@ static void test_valid_values_weekday() {
// Use supplied locale (ja_JP).
// This locale has a
diff erent alternate, but not on all platforms
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%a='木'\t%A='木曜日'\t%u='4'\t%Ou='4'\t%w='4'\t%Ow='4'\n"),
lfmt,
@@ -314,7 +322,7 @@ static void test_valid_values_weekday() {
SV("%a='日'\t%A='日曜日'\t%u='7'\t%Ou='7'\t%w='0'\t%Ow='0'\n"),
lfmt,
std::chrono::sys_seconds(4'294'967'295s)); // 06:28:15 UTC on Sunday, 7 February 2106
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%a='木'\t%A='木曜日'\t%u='4'\t%Ou='四'\t%w='4'\t%Ow='四'\n"),
lfmt,
@@ -324,7 +332,7 @@ static void test_valid_values_weekday() {
SV("%a='日'\t%A='日曜日'\t%u='7'\t%Ou='七'\t%w='0'\t%Ow='〇'\n"),
lfmt,
std::chrono::sys_seconds(4'294'967'295s)); // 06:28:15 UTC on Sunday, 7 February 2106
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -385,7 +393,7 @@ static void test_valid_values_week() {
std::chrono::sys_seconds(2'000'000'000s)); // 03:33:20 UTC on Wednesday, 18 May 2033
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%U='00'\t%OU='00'\t%W='00'\t%OW='00'\n"),
lfmt,
@@ -395,7 +403,7 @@ static void test_valid_values_week() {
SV("%U='20'\t%OU='20'\t%W='20'\t%OW='20'\n"),
lfmt,
std::chrono::sys_seconds(2'000'000'000s)); // 03:33:20 UTC on Wednesday, 18 May 2033
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%U='00'\t%OU='〇'\t%W='00'\t%OW='〇'\n"),
lfmt,
@@ -405,7 +413,7 @@ static void test_valid_values_week() {
SV("%U='20'\t%OU='二十'\t%W='20'\t%OW='二十'\n"),
lfmt,
std::chrono::sys_seconds(2'000'000'000s)); // 03:33:20 UTC on Wednesday, 18 May 2033
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -438,7 +446,7 @@ static void test_valid_values_iso_8601_week() {
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%g='70'\t%G='1970'\t%V='01'\t%OV='01'\n"),
lfmt,
@@ -448,7 +456,7 @@ static void test_valid_values_iso_8601_week() {
SV("%g='09'\t%G='2009'\t%V='07'\t%OV='07'\n"),
lfmt,
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%g='70'\t%G='1970'\t%V='01'\t%OV='一'\n"),
lfmt,
@@ -458,7 +466,7 @@ static void test_valid_values_iso_8601_week() {
SV("%g='09'\t%G='2009'\t%V='07'\t%OV='七'\n"),
lfmt,
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -483,7 +491,7 @@ static void test_valid_values_date() {
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
// Use the global locale (fr_FR)
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
check(SV("%D='01/01/70'\t%F='1970-01-01'\t%x='01.01.1970'\t%Ex='01.01.1970'\n"),
lfmt,
std::chrono::sys_seconds(0s)); // 00:00:00 UTC Thursday, 1 January 1970
@@ -502,7 +510,7 @@ static void test_valid_values_date() {
#endif
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%D='01/01/70'\t%F='1970-01-01'\t%x='1970/01/01'\t%Ex='1970/01/01'\n"),
lfmt,
@@ -512,7 +520,7 @@ static void test_valid_values_date() {
SV("%D='02/13/09'\t%F='2009-02-13'\t%x='2009/02/13'\t%Ex='2009/02/13'\n"),
lfmt,
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%D='01/01/70'\t%F='1970-01-01'\t%x='1970年01月01日'\t%Ex='昭和45年01月01日'\n"),
lfmt,
@@ -522,7 +530,7 @@ static void test_valid_values_date() {
SV("%D='02/13/09'\t%F='2009-02-13'\t%x='2009年02月13日'\t%Ex='平成21年02月13日'\n"),
lfmt,
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -626,7 +634,7 @@ static void test_valid_values_time() {
"%r='00:00:00'\t"
#elif defined(_AIX)
"%r='12:00:00 AM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#else
"%r='12:00:00 '\t"
@@ -656,7 +664,7 @@ static void test_valid_values_time() {
"%r='23:31:30'\t"
#elif defined(_AIX)
"%r='11:31:30 PM'\t"
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
"%r=''\t"
#else
"%r='11:31:30 '\t"
@@ -669,7 +677,7 @@ static void test_valid_values_time() {
1'234'567'890'123ms)); // 23:31:30 UTC on Friday, 13 February 2009
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
check(loc,
SV("%H='00'\t"
"%OH='00'\t"
@@ -686,8 +694,12 @@ static void test_valid_values_time() {
# endif
"%R='00:00'\t"
"%T='00:00:00'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='12:00:00 AM'\t"
+# else
+ "%r='12:00:00 午前'\t"
+# endif
"%X='00時00分00秒'\t"
"%EX='00時00分00秒'\t"
# elif defined(_WIN32)
@@ -719,8 +731,12 @@ static void test_valid_values_time() {
# endif
"%R='23:31'\t"
"%T='23:31:30.123'\t"
-# if defined(__APPLE__)
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# if defined(__APPLE__)
"%r='11:31:30 PM'\t"
+# else
+ "%r='11:31:30 午後'\t"
+# endif
"%X='23時31分30秒'\t"
"%EX='23時31分30秒'\t"
# elif defined(_WIN32)
@@ -735,7 +751,7 @@ static void test_valid_values_time() {
"\n"),
lfmt,
std::chrono::hh_mm_ss(23h + 31min + 30s + 123ms));
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
check(loc,
SV("%H='00'\t"
"%OH='〇'\t"
@@ -774,7 +790,7 @@ static void test_valid_values_time() {
lfmt,
std::chrono::sys_time<std::chrono::milliseconds>(
1'234'567'890'123ms)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -809,6 +825,8 @@ static void test_valid_values_date_time() {
SV("%c='Jeu 1 jan 00:00:00 1970'\t%Ec='Jeu 1 jan 00:00:00 1970'\n"),
#elif defined(_WIN32)
SV("%c='01/01/1970 00:00:00'\t%Ec='01/01/1970 00:00:00'\n"),
+#elif defined(__FreeBSD__)
+ SV("%c='jeu. 1 janv. 00:00:00 1970'\t%Ec='jeu. 1 janv. 00:00:00 1970'\n"),
#else
SV("%c='jeu. 01 janv. 1970 00:00:00'\t%Ec='jeu. 01 janv. 1970 00:00:00'\n"),
#endif
@@ -825,6 +843,8 @@ static void test_valid_values_date_time() {
SV("%c='Ven 13 fév 23:31:30 2009'\t%Ec='Ven 13 fév 23:31:30 2009'\n"),
#elif defined(_WIN32)
SV("%c='13/02/2009 23:31:30'\t%Ec='13/02/2009 23:31:30'\n"),
+#elif defined(__FreeBSD__)
+ SV("%c='ven. 13 févr. 23:31:30 2009'\t%Ec='ven. 13 févr. 23:31:30 2009'\n"),
#else
SV("%c='ven. 13 févr. 2009 23:31:30'\t%Ec='ven. 13 févr. 2009 23:31:30'\n"),
#endif
@@ -832,7 +852,7 @@ static void test_valid_values_date_time() {
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.a
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
check(loc,
SV("%c='木 1/ 1 00:00:00 1970'\t%Ec='木 1/ 1 00:00:00 1970'\n"),
lfmt,
@@ -841,7 +861,7 @@ static void test_valid_values_date_time() {
SV("%c='金 2/13 23:31:30 2009'\t%Ec='金 2/13 23:31:30 2009'\n"),
lfmt,
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#elif defined(_AIX) // __APPLE__
+#elif defined(_AIX) // defined(__APPLE__)|| defined(__FreeBSD__)
check(loc,
SV("%c='1970年01月 1日 00:00:00 UTC'\t%Ec='1970年01月 1日 00:00:00 UTC'\n"),
lfmt,
@@ -850,7 +870,7 @@ static void test_valid_values_date_time() {
SV("%c='2009年02月13日 23:31:30 UTC'\t%Ec='2009年02月13日 23:31:30 UTC'\n"),
lfmt,
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#elif defined(_WIN32) // __APPLE__
+#elif defined(_WIN32) // defined(__APPLE__)|| defined(__FreeBSD__)
check(loc,
SV("%c='1970/01/01 0:00:00'\t%Ec='1970/01/01 0:00:00'\n"),
lfmt,
@@ -859,7 +879,7 @@ static void test_valid_values_date_time() {
SV("%c='2009/02/13 23:31:30'\t%Ec='2009/02/13 23:31:30'\n"),
lfmt,
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#else // __APPLE__
+#else // defined(__APPLE__)|| defined(__FreeBSD__)
check(loc,
SV("%c='1970年01月01日 00時00分00秒'\t%Ec='昭和45年01月01日 00時00分00秒'\n"),
lfmt,
@@ -869,7 +889,7 @@ static void test_valid_values_date_time() {
SV("%c='2009年02月13日 23時31分30秒'\t%Ec='平成21年02月13日 23時31分30秒'\n"),
lfmt,
std::chrono::sys_seconds(1'234'567'890s)); // 23:31:30 UTC on Friday, 13 February 2009
-#endif // __APPLE__
+#endif // defined(__APPLE__)|| defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -918,10 +938,17 @@ static void test_valid_values_time_zone() {
std::chrono::sys_seconds(0s)); // 00:00:00 UTC Thursday, 1 January 1970
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.a
+# if defined(__FreeBSD__)
+ check(loc,
+ SV("%z='+0000'\t%Ez='+0000'\t%Oz='+0000'\t%Z='UTC'\n"),
+ lfmt,
+ std::chrono::sys_seconds(0s)); // 00:00:00 UTC Thursday, 1 January 1970
+# else
check(loc,
SV("%z='+0000'\t%Ez='+0000'\t%Oz='+〇'\t%Z='UTC'\n"),
lfmt,
std::chrono::sys_seconds(0s)); // 00:00:00 UTC Thursday, 1 January 1970
+# endif
# endif // defined(_AIX)
std::locale::global(std::locale::classic());
#endif // !defined(__APPLE__) && !defined(_WIN32)
diff --git a/libcxx/test/std/time/time.syn/formatter.weekday.pass.cpp b/libcxx/test/std/time/time.syn/formatter.weekday.pass.cpp
index a9213ca9636246..28b742acba60be 100644
--- a/libcxx/test/std/time/time.syn/formatter.weekday.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.weekday.pass.cpp
@@ -5,8 +5,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -93,7 +91,7 @@ static void test_valid_values() {
// Use supplied locale (ja_JP).
// This locale has a
diff erent alternate, but not on all platforms
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc, SV("%u='7'\t%Ou='7'\t%w='0'\t%Ow='0'\t%a='日'\t%A='日曜日'\n"), lfmt, std::chrono::weekday(0));
check(loc, SV("%u='1'\t%Ou='1'\t%w='1'\t%Ow='1'\t%a='月'\t%A='月曜日'\n"), lfmt, std::chrono::weekday(1));
check(loc, SV("%u='2'\t%Ou='2'\t%w='2'\t%Ow='2'\t%a='火'\t%A='火曜日'\n"), lfmt, std::chrono::weekday(2));
@@ -130,7 +128,7 @@ static void test_invalid_values() {
const std::locale loc(LOCALE_ja_JP_UTF_8);
std::locale::global(std::locale(LOCALE_fr_FR_UTF_8));
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
// Non localized output using C-locale
check(SV("%u='8'\t%Ou='8'\t%w='8'\t%Ow='8'\n"), fmt, std::chrono::weekday(8));
check(SV("%u='255'\t%Ou='255'\t%w='255'\t%Ow='255'\n"), fmt, std::chrono::weekday(255));
@@ -142,7 +140,7 @@ static void test_invalid_values() {
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
check(loc, SV("%u='8'\t%Ou='8'\t%w='8'\t%Ow='8'\n"), lfmt, std::chrono::weekday(8));
check(loc, SV("%u='255'\t%Ou='255'\t%w='255'\t%Ow='255'\n"), lfmt, std::chrono::weekday(255));
-#elif defined(_AIX) // defined(__APPLE__)
+#elif defined(_AIX) // defined(__APPLE__) || defined(__FreeBSD__)
// Non localized output using C-locale
check(SV("%u='8'\t%Ou='8'\t%w='8'\t%Ow='8'\n"), fmt, std::chrono::weekday(8));
check(SV("%u='5'\t%Ou='5'\t%w='5'\t%Ow='5'\n"), fmt, std::chrono::weekday(255));
@@ -154,7 +152,7 @@ static void test_invalid_values() {
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
check(loc, SV("%u='8'\t%Ou='8'\t%w='8'\t%Ow='8'\n"), lfmt, std::chrono::weekday(8));
check(loc, SV("%u='5'\t%Ou='5'\t%w='5'\t%Ow='5'\n"), lfmt, std::chrono::weekday(255));
-#elif defined(_WIN32) // defined(__APPLE__)
+#elif defined(_WIN32) // defined(__APPLE__) || defined(__FreeBSD__)
// Non localized output using C-locale
check(SV("%u=''\t%Ou=''\t%w=''\t%Ow=''\n"), fmt, std::chrono::weekday(8));
check(SV("%u=''\t%Ou=''\t%w=''\t%Ow=''\n"), fmt, std::chrono::weekday(255));
@@ -166,7 +164,7 @@ static void test_invalid_values() {
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
check(loc, SV("%u=''\t%Ou=''\t%w=''\t%Ow=''\n"), lfmt, std::chrono::weekday(8));
check(loc, SV("%u=''\t%Ou=''\t%w=''\t%Ow=''\n"), lfmt, std::chrono::weekday(255));
-#else // defined(__APPLE__)
+#else // defined(__APPLE__) || defined(__FreeBSD__)
// Non localized output using C-locale
check(SV("%u='1'\t%Ou='1'\t%w='8'\t%Ow='8'\n"), fmt, std::chrono::weekday(8));
check(SV("%u='3'\t%Ou='3'\t%w='255'\t%Ow='255'\n"), fmt, std::chrono::weekday(255));
@@ -178,7 +176,7 @@ static void test_invalid_values() {
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
check(loc, SV("%u='1'\t%Ou='一'\t%w='8'\t%Ow='八'\n"), lfmt, std::chrono::weekday(8));
check(loc, SV("%u='3'\t%Ou='三'\t%w='255'\t%Ow='255'\n"), lfmt, std::chrono::weekday(255));
-#endif // defined(__APPLE__)
+#endif // defined(__APPLE__) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
diff --git a/libcxx/test/std/time/time.syn/formatter.weekday_index.pass.cpp b/libcxx/test/std/time/time.syn/formatter.weekday_index.pass.cpp
index a7f430877508c2..03d3e77e0d712d 100644
--- a/libcxx/test/std/time/time.syn/formatter.weekday_index.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.weekday_index.pass.cpp
@@ -5,8 +5,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -157,7 +155,7 @@ static void test_valid_values() {
// Use supplied locale (ja_JP).
// This locale has a
diff erent alternate, but not on all platforms
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%u='7'\t%Ou='7'\t%w='0'\t%Ow='0'\t%a='日'\t%A='日曜日'\n"),
lfmt,
@@ -190,7 +188,7 @@ static void test_valid_values() {
SV("%u='7'\t%Ou='7'\t%w='0'\t%Ow='0'\t%a='日'\t%A='日曜日'\n"),
lfmt,
std::chrono::weekday_indexed{std::chrono::weekday(7), 7});
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%u='7'\t%Ou='七'\t%w='0'\t%Ow='〇'\t%a='日'\t%A='日曜日'\n"),
lfmt,
@@ -223,7 +221,7 @@ static void test_valid_values() {
SV("%u='7'\t%Ou='七'\t%w='0'\t%Ow='〇'\t%a='日'\t%A='日曜日'\n"),
lfmt,
std::chrono::weekday_indexed{std::chrono::weekday(7), 7});
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -250,7 +248,7 @@ static void test_invalid_values() {
{ // Invalid weekday, can't test %a and %A
constexpr std::basic_string_view<CharT> fmt = SV("{:%%u='%u'%t%%Ou='%Ou'%t%%w='%w'%t%%Ow='%Ow'%n}");
constexpr std::basic_string_view<CharT> lfmt = SV("{:L%%u='%u'%t%%Ou='%Ou'%t%%w='%w'%t%%Ow='%Ow'%n}");
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
// Non localized output using C-locale
check(SV("%u='8'\t%Ou='8'\t%w='8'\t%Ow='8'\n"), fmt, std::chrono::weekday_indexed{std::chrono::weekday(8), 0});
check(SV("%u='8'\t%Ou='8'\t%w='8'\t%Ow='8'\n"), fmt, std::chrono::weekday_indexed{std::chrono::weekday(8), 1});
@@ -284,7 +282,7 @@ static void test_invalid_values() {
SV("%u='255'\t%Ou='255'\t%w='255'\t%Ow='255'\n"),
lfmt,
std::chrono::weekday_indexed{std::chrono::weekday(255), 1});
-#elif defined(_WIN32) // defined(__APPLE__)
+#elif defined(_WIN32) // defined(__APPLE__) || defined(__FreeBSD__)
// Non localized output using C-locale
check(SV("%u=''\t%Ou=''\t%w=''\t%Ow=''\n"), fmt, std::chrono::weekday_indexed{std::chrono::weekday(8), 0});
check(SV("%u=''\t%Ou=''\t%w=''\t%Ow=''\n"), fmt, std::chrono::weekday_indexed{std::chrono::weekday(8), 1});
@@ -302,7 +300,7 @@ static void test_invalid_values() {
check(loc, SV("%u=''\t%Ou=''\t%w=''\t%Ow=''\n"), lfmt, std::chrono::weekday_indexed{std::chrono::weekday(8), 1});
check(loc, SV("%u=''\t%Ou=''\t%w=''\t%Ow=''\n"), lfmt, std::chrono::weekday_indexed{std::chrono::weekday(255), 0});
check(loc, SV("%u=''\t%Ou=''\t%w=''\t%Ow=''\n"), lfmt, std::chrono::weekday_indexed{std::chrono::weekday(255), 1});
-#elif defined(_AIX) // defined(__APPLE__)
+#elif defined(_AIX) // defined(__APPLE__) || defined(__FreeBSD__)
// Non localized output using C-locale
check(SV("%u='8'\t%Ou='8'\t%w='8'\t%Ow='8'\n"), fmt, std::chrono::weekday_indexed{std::chrono::weekday(8), 0});
check(SV("%u='8'\t%Ou='8'\t%w='8'\t%Ow='8'\n"), fmt, std::chrono::weekday_indexed{std::chrono::weekday(8), 1});
@@ -328,7 +326,7 @@ static void test_invalid_values() {
SV("%u='5'\t%Ou='5'\t%w='5'\t%Ow='5'\n"),
lfmt,
std::chrono::weekday_indexed{std::chrono::weekday(255), 1});
-#else // defined(__APPLE__)
+#else // defined(__APPLE__) || defined(__FreeBSD__)
// Non localized output using C-locale
check(SV("%u='1'\t%Ou='1'\t%w='8'\t%Ow='8'\n"), fmt, std::chrono::weekday_indexed{std::chrono::weekday(8), 0});
check(SV("%u='1'\t%Ou='1'\t%w='8'\t%Ow='8'\n"), fmt, std::chrono::weekday_indexed{std::chrono::weekday(8), 1});
@@ -362,7 +360,7 @@ static void test_invalid_values() {
SV("%u='3'\t%Ou='三'\t%w='255'\t%Ow='255'\n"),
lfmt,
std::chrono::weekday_indexed{std::chrono::weekday(255), 1});
-#endif // defined(__APPLE__)
+#endif // defined(__APPLE__) || defined(__FreeBSD__)
}
{ // Valid weekday, tests %a and %A
diff --git a/libcxx/test/std/time/time.syn/formatter.weekday_last.pass.cpp b/libcxx/test/std/time/time.syn/formatter.weekday_last.pass.cpp
index 48e6e9dc2af719..ea73382cb19097 100644
--- a/libcxx/test/std/time/time.syn/formatter.weekday_last.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.weekday_last.pass.cpp
@@ -5,8 +5,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -140,7 +138,7 @@ static void test_valid_values() {
// Use supplied locale (ja_JP).
// This locale has a
diff erent alternate, but not on all platforms
-#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%u='7'\t%Ou='7'\t%w='0'\t%Ow='0'\t%a='日'\t%A='日曜日'\n"),
lfmt,
@@ -173,7 +171,7 @@ static void test_valid_values() {
SV("%u='7'\t%Ou='7'\t%w='0'\t%Ow='0'\t%a='日'\t%A='日曜日'\n"),
lfmt,
std::chrono::weekday_last{std::chrono::weekday(7)});
-#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
check(loc,
SV("%u='7'\t%Ou='七'\t%w='0'\t%Ow='〇'\t%a='日'\t%A='日曜日'\n"),
lfmt,
@@ -206,7 +204,7 @@ static void test_valid_values() {
SV("%u='7'\t%Ou='七'\t%w='0'\t%Ow='〇'\t%a='日'\t%A='日曜日'\n"),
lfmt,
std::chrono::weekday_last{std::chrono::weekday(7)});
-#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
+#endif // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
@@ -233,7 +231,7 @@ static void test_invalid_values() {
const std::locale loc(LOCALE_ja_JP_UTF_8);
std::locale::global(std::locale(LOCALE_fr_FR_UTF_8));
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
// Non localized output using C-locale
check(SV("%u='8'\t%Ou='8'\t%w='8'\t%Ow='8'\n"), fmt, std::chrono::weekday_last{std::chrono::weekday(8)});
check(SV("%u='255'\t%Ou='255'\t%w='255'\t%Ow='255'\n"), fmt, std::chrono::weekday_last{std::chrono::weekday(255)});
@@ -248,7 +246,7 @@ static void test_invalid_values() {
SV("%u='255'\t%Ou='255'\t%w='255'\t%Ow='255'\n"),
lfmt,
std::chrono::weekday_last{std::chrono::weekday(255)});
-#elif defined(_WIN32) // defined(__APPLE__)
+#elif defined(_WIN32) // defined(__APPLE__) || defined(__FreeBSD__)
// Non localized output using C-locale
check(SV("%u=''\t%Ou=''\t%w=''\t%Ow=''\n"), fmt, std::chrono::weekday_last{std::chrono::weekday(8)});
check(SV("%u=''\t%Ou=''\t%w=''\t%Ow=''\n"), fmt, std::chrono::weekday_last{std::chrono::weekday(255)});
@@ -260,7 +258,7 @@ static void test_invalid_values() {
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
check(loc, SV("%u=''\t%Ou=''\t%w=''\t%Ow=''\n"), lfmt, std::chrono::weekday_last{std::chrono::weekday(8)});
check(loc, SV("%u=''\t%Ou=''\t%w=''\t%Ow=''\n"), lfmt, std::chrono::weekday_last{std::chrono::weekday(255)});
-#elif defined(_AIX) // defined(__APPLE__)
+#elif defined(_AIX) // defined(__APPLE__) || defined(__FreeBSD__)
// Non localized output using C-locale
check(SV("%u='8'\t%Ou='8'\t%w='8'\t%Ow='8'\n"), fmt, std::chrono::weekday_last{std::chrono::weekday(8)});
check(SV("%u='5'\t%Ou='5'\t%w='5'\t%Ow='5'\n"), fmt, std::chrono::weekday_last{std::chrono::weekday(255)});
@@ -272,7 +270,7 @@ static void test_invalid_values() {
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
check(loc, SV("%u='8'\t%Ou='8'\t%w='8'\t%Ow='8'\n"), lfmt, std::chrono::weekday_last{std::chrono::weekday(8)});
check(loc, SV("%u='5'\t%Ou='5'\t%w='5'\t%Ow='5'\n"), lfmt, std::chrono::weekday_last{std::chrono::weekday(255)});
-#else // defined(__APPLE__)
+#else // defined(__APPLE__) || defined(__FreeBSD__)
// Non localized output using C-locale
check(SV("%u='1'\t%Ou='1'\t%w='8'\t%Ow='8'\n"), fmt, std::chrono::weekday_last{std::chrono::weekday(8)});
check(SV("%u='3'\t%Ou='3'\t%w='255'\t%Ow='255'\n"), fmt, std::chrono::weekday_last{std::chrono::weekday(255)});
@@ -284,7 +282,7 @@ static void test_invalid_values() {
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
check(loc, SV("%u='1'\t%Ou='一'\t%w='8'\t%Ow='八'\n"), lfmt, std::chrono::weekday_last{std::chrono::weekday(8)});
check(loc, SV("%u='3'\t%Ou='三'\t%w='255'\t%Ow='255'\n"), lfmt, std::chrono::weekday_last{std::chrono::weekday(255)});
-#endif // defined(__APPLE__)
+#endif // defined(__APPLE__) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
diff --git a/libcxx/test/std/time/time.syn/formatter.year.pass.cpp b/libcxx/test/std/time/time.syn/formatter.year.pass.cpp
index 9cf2836888f2a9..cf1b99a62d963f 100644
--- a/libcxx/test/std/time/time.syn/formatter.year.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.year.pass.cpp
@@ -5,8 +5,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -83,7 +81,7 @@ static void test_valid_values() {
// Non localized output using C-locale
check(SV("%C='00'\t"
-#if defined(__APPLE__) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_WIN32) || defined(__FreeBSD__)
"%EC='00'\t"
#else
"%EC='0'\t"
@@ -92,7 +90,7 @@ static void test_valid_values() {
"%Ey='00'\t"
"%Oy='00'\t"
"%Y='0000'\t"
-#if defined(__APPLE__) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_WIN32) || defined(__FreeBSD__)
"%EY='0000'\t"
#elif defined(_AIX)
"%EY=''\t"
@@ -127,7 +125,7 @@ static void test_valid_values() {
// Use the global locale (fr_FR)
check(SV("%C='00'\t"
-#if defined(__APPLE__) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_WIN32) || defined(__FreeBSD__)
"%EC='00'\t"
#else
"%EC='0'\t"
@@ -136,7 +134,7 @@ static void test_valid_values() {
"%Ey='00'\t"
"%Oy='00'\t"
"%Y='0000'\t"
-#if defined(__APPLE__) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_WIN32) || defined(__FreeBSD__)
"%EY='0000'\t"
#elif defined(_AIX)
"%EY=''\t"
@@ -170,10 +168,10 @@ static void test_valid_values() {
std::chrono::year{2038});
// Use supplied locale (ja_JP). This locale has a
diff erent alternate.
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
check(SV("%C='00'\t"
-# if defined(__APPLE__) || defined(_WIN32)
+# if defined(__APPLE__) || defined(_WIN32) || defined(__FreeBSD__)
"%EC='00'\t"
# else
"%EC='0'\t"
@@ -213,7 +211,7 @@ static void test_valid_values() {
lfmt,
std::chrono::year{2038});
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
check(loc,
SV("%C='00'\t"
"%EC='紀元前'\t"
@@ -260,7 +258,7 @@ static void test_valid_values() {
"\n"),
lfmt,
std::chrono::year{2038});
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
std::locale::global(std::locale::classic());
}
diff --git a/libcxx/test/std/time/time.syn/formatter.year_month.pass.cpp b/libcxx/test/std/time/time.syn/formatter.year_month.pass.cpp
index d6a4b81b9dbc25..f80f474304b485 100644
--- a/libcxx/test/std/time/time.syn/formatter.year_month.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.year_month.pass.cpp
@@ -5,8 +5,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -189,17 +187,17 @@ static void test_valid_values() {
#endif // defined(_WIN32)
"%y='70'\t"
"%Y='1970'\t"
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%EC='19'\t"
"%Ey='70'\t"
"%EY='1970'\t"
"%Oy='70'\t"
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%EC='昭和'\t"
"%Ey='45'\t"
"%EY='昭和45年'\t"
"%Oy='七十'\t"
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"\n"),
lfmt,
std::chrono::year_month{std::chrono::year{1970}, std::chrono::January});
@@ -229,17 +227,17 @@ static void test_valid_values() {
#endif // defined(_WIN32)
"%y='04'\t"
"%Y='2004'\t"
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%EC='20'\t"
"%Ey='04'\t"
"%EY='2004'\t"
"%Oy='04'\t"
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%EC='平成'\t"
"%Ey='16'\t"
"%EY='平成16年'\t"
"%Oy='四'\t"
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"\n"),
lfmt,
std::chrono::year_month{std::chrono::year{2004}, std::chrono::May});
diff --git a/libcxx/test/std/time/time.syn/formatter.year_month_day.pass.cpp b/libcxx/test/std/time/time.syn/formatter.year_month_day.pass.cpp
index aa170f78a0903c..5a2b7afa37a865 100644
--- a/libcxx/test/std/time/time.syn/formatter.year_month_day.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.year_month_day.pass.cpp
@@ -5,8 +5,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -543,11 +541,11 @@ static void test_valid_md_values() {
lfmt,
std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::March, std::chrono::day{9}});
check(
-# if defined(_WIN32) || defined(_AIX)
+# if defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
SV("%b='avr.'\t%B='avril'\t%h='avr.'\t%m='04'\t%Om='04'\t%d='10'\t%e='10'\t%Od='10'\t%Oe='10'\n"),
-# else // defined(_WIN32) || defined(_AIX)
+# else // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
SV("%b='avril'\t%B='avril'\t%h='avril'\t%m='04'\t%Om='04'\t%d='10'\t%e='10'\t%Od='10'\t%Oe='10'\n"),
-# endif // defined(_WIN32) || defined(_AIX)
+# endif // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
lfmt,
std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::April, std::chrono::day{10}});
check(SV("%b='mai'\t%B='mai'\t%h='mai'\t%m='05'\t%Om='05'\t%d='28'\t%e='28'\t%Od='28'\t%Oe='28'\n"),
@@ -699,6 +697,55 @@ static void test_valid_md_values() {
SV("%b='12月'\t%B='12月'\t%h='12月'\t%m='12'\t%Om='12'\t%d='55'\t%e='55'\t%Od='55'\t%Oe='55'\n"),
lfmt,
std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::December, std::chrono::day{255}});
+#elif defined(__FreeBSD__) // defined(_WIN32)
+ check(loc,
+ SV("%b=' 1月'\t%B='1月'\t%h=' 1月'\t%m='01'\t%Om='01'\t%d='00'\t%e=' 0'\t%Od='00'\t%Oe=' 0'\n"),
+ lfmt,
+ std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::January, std::chrono::day{0}});
+ check(loc,
+ SV("%b=' 2月'\t%B='2月'\t%h=' 2月'\t%m='02'\t%Om='02'\t%d='01'\t%e=' 1'\t%Od='01'\t%Oe=' 1'\n"),
+ lfmt,
+ std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::February, std::chrono::day{1}});
+ check(loc,
+ SV("%b=' 3月'\t%B='3月'\t%h=' 3月'\t%m='03'\t%Om='03'\t%d='09'\t%e=' 9'\t%Od='09'\t%Oe=' 9'\n"),
+ lfmt,
+ std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::March, std::chrono::day{9}});
+ check(loc,
+ SV("%b=' 4月'\t%B='4月'\t%h=' 4月'\t%m='04'\t%Om='04'\t%d='10'\t%e='10'\t%Od='10'\t%Oe='10'\n"),
+ lfmt,
+ std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::April, std::chrono::day{10}});
+ check(loc,
+ SV("%b=' 5月'\t%B='5月'\t%h=' 5月'\t%m='05'\t%Om='05'\t%d='28'\t%e='28'\t%Od='28'\t%Oe='28'\n"),
+ lfmt,
+ std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::May, std::chrono::day{28}});
+ check(loc,
+ SV("%b=' 6月'\t%B='6月'\t%h=' 6月'\t%m='06'\t%Om='06'\t%d='29'\t%e='29'\t%Od='29'\t%Oe='29'\n"),
+ lfmt,
+ std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::June, std::chrono::day{29}});
+ check(loc,
+ SV("%b=' 7月'\t%B='7月'\t%h=' 7月'\t%m='07'\t%Om='07'\t%d='30'\t%e='30'\t%Od='30'\t%Oe='30'\n"),
+ lfmt,
+ std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::July, std::chrono::day{30}});
+ check(loc,
+ SV("%b=' 8月'\t%B='8月'\t%h=' 8月'\t%m='08'\t%Om='08'\t%d='31'\t%e='31'\t%Od='31'\t%Oe='31'\n"),
+ lfmt,
+ std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::August, std::chrono::day{31}});
+ check(loc,
+ SV("%b=' 9月'\t%B='9月'\t%h=' 9月'\t%m='09'\t%Om='09'\t%d='32'\t%e='32'\t%Od='32'\t%Oe='32'\n"),
+ lfmt,
+ std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::September, std::chrono::day{32}});
+ check(loc,
+ SV("%b='10月'\t%B='10月'\t%h='10月'\t%m='10'\t%Om='10'\t%d='99'\t%e='99'\t%Od='99'\t%Oe='99'\n"),
+ lfmt,
+ std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::October, std::chrono::day{99}});
+ check(loc,
+ SV("%b='11月'\t%B='11月'\t%h='11月'\t%m='11'\t%Om='11'\t%d='100'\t%e='100'\t%Od='100'\t%Oe='100'\n"),
+ lfmt,
+ std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::November, std::chrono::day{100}});
+ check(loc,
+ SV("%b='12月'\t%B='12月'\t%h='12月'\t%m='12'\t%Om='12'\t%d='255'\t%e='255'\t%Od='255'\t%Oe='255'\n"),
+ lfmt,
+ std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::December, std::chrono::day{255}});
#elif defined(__APPLE__) // defined(_WIN32)
check(loc,
SV("%b=' 1'\t%B='1月'\t%h=' 1'\t%m='01'\t%Om='01'\t%d='00'\t%e=' 0'\t%Od='00'\t%Oe=' 0'\n"),
@@ -935,14 +982,14 @@ static void test_valid_ymd_values() {
"%V='01'\t"
"%w='4'\t"
"%W='00'\t"
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
"%x='01.01.1970'\t"
#else
"%x='01/01/1970'\t"
#endif
"%y='70'\t"
"%Y='1970'\t"
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
"%Ex='01.01.1970'\t"
#else
"%Ex='01/01/1970'\t"
@@ -972,14 +1019,14 @@ static void test_valid_ymd_values() {
"%V='22'\t"
"%w='6'\t"
"%W='21'\t"
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
"%x='29.05.2004'\t"
#else
"%x='29/05/2004'\t"
#endif
"%y='04'\t"
"%Y='2004'\t"
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
"%Ex='29.05.2004'\t"
#else
"%Ex='29/05/2004'\t"
@@ -1011,14 +1058,14 @@ static void test_valid_ymd_values() {
"%V='01'\t"
"%w='4'\t"
"%W='00'\t"
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%x='1970/01/01'\t"
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%x='1970年01月01日'\t"
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%y='70'\t"
"%Y='1970'\t"
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%Ex='1970/01/01'\t"
"%EC='19'\t"
"%Ey='70'\t"
@@ -1029,7 +1076,7 @@ static void test_valid_ymd_values() {
"%Ow='4'\t"
"%OW='00'\t"
"%Oy='70'\t"
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%Ex='昭和45年01月01日'\t"
"%EC='昭和'\t"
"%Ey='45'\t"
@@ -1040,7 +1087,7 @@ static void test_valid_ymd_values() {
"%Ow='四'\t"
"%OW='〇'\t"
"%Oy='七十'\t"
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"\n"),
lfmt,
std::chrono::year_month_day{std::chrono::year{1970}, std::chrono::January, std::chrono::day{1}});
@@ -1058,14 +1105,14 @@ static void test_valid_ymd_values() {
"%V='22'\t"
"%w='6'\t"
"%W='21'\t"
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%x='2004/05/29'\t"
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%x='2004年05月29日'\t"
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%y='04'\t"
"%Y='2004'\t"
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%Ex='2004/05/29'\t"
"%EC='20'\t"
"%Ey='04'\t"
@@ -1076,7 +1123,7 @@ static void test_valid_ymd_values() {
"%Ow='6'\t"
"%OW='21'\t"
"%Oy='04'\t"
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%Ex='平成16年05月29日'\t"
"%EC='平成'\t"
"%Ey='16'\t"
@@ -1087,7 +1134,7 @@ static void test_valid_ymd_values() {
"%Ow='六'\t"
"%OW='二十一'\t"
"%Oy='四'\t"
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"\n"),
lfmt,
std::chrono::year_month_day{std::chrono::year{2004}, std::chrono::May, std::chrono::day{29}});
diff --git a/libcxx/test/std/time/time.syn/formatter.year_month_day_last.pass.cpp b/libcxx/test/std/time/time.syn/formatter.year_month_day_last.pass.cpp
index 7ca0b6953fe185..db1cdfcf0e88a0 100644
--- a/libcxx/test/std/time/time.syn/formatter.year_month_day_last.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.year_month_day_last.pass.cpp
@@ -5,8 +5,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -347,11 +345,11 @@ static void test_valid_md_values() {
lfmt,
std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::March}});
check(
-# if defined(_WIN32) || defined(_AIX)
+# if defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
SV("%b='avr.'\t%B='avril'\t%h='avr.'\t%m='04'\t%Om='04'\t%d='30'\t%e='30'\t%Od='30'\t%Oe='30'\n"),
-# else // defined(_WIN32) || defined(_AIX)
+# else // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
SV("%b='avril'\t%B='avril'\t%h='avril'\t%m='04'\t%Om='04'\t%d='30'\t%e='30'\t%Od='30'\t%Oe='30'\n"),
-# endif // defined(_WIN32) || defined(_AIX)
+# endif // defined(_WIN32) || defined(_AIX) || defined(__FreeBSD__)
lfmt,
std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::April}});
check(SV("%b='mai'\t%B='mai'\t%h='mai'\t%m='05'\t%Om='05'\t%d='31'\t%e='31'\t%Od='31'\t%Oe='31'\n"),
@@ -479,6 +477,55 @@ static void test_valid_md_values() {
SV("%b='12月'\t%B='12月'\t%h='12月'\t%m='12'\t%Om='12'\t%d='31'\t%e='31'\t%Od='31'\t%Oe='31'\n"),
lfmt,
std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::December}});
+#elif defined(__FreeBSD__) // defined(_WIN32)
+ check(loc,
+ SV("%b=' 1月'\t%B='1月'\t%h=' 1月'\t%m='01'\t%Om='01'\t%d='31'\t%e='31'\t%Od='31'\t%Oe='31'\n"),
+ lfmt,
+ std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::January}});
+ check(loc,
+ SV("%b=' 2月'\t%B='2月'\t%h=' 2月'\t%m='02'\t%Om='02'\t%d='28'\t%e='28'\t%Od='28'\t%Oe='28'\n"),
+ lfmt,
+ std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::February}});
+ check(loc,
+ SV("%b=' 3月'\t%B='3月'\t%h=' 3月'\t%m='03'\t%Om='03'\t%d='31'\t%e='31'\t%Od='31'\t%Oe='31'\n"),
+ lfmt,
+ std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::March}});
+ check(loc,
+ SV("%b=' 4月'\t%B='4月'\t%h=' 4月'\t%m='04'\t%Om='04'\t%d='30'\t%e='30'\t%Od='30'\t%Oe='30'\n"),
+ lfmt,
+ std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::April}});
+ check(loc,
+ SV("%b=' 5月'\t%B='5月'\t%h=' 5月'\t%m='05'\t%Om='05'\t%d='31'\t%e='31'\t%Od='31'\t%Oe='31'\n"),
+ lfmt,
+ std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::May}});
+ check(loc,
+ SV("%b=' 6月'\t%B='6月'\t%h=' 6月'\t%m='06'\t%Om='06'\t%d='30'\t%e='30'\t%Od='30'\t%Oe='30'\n"),
+ lfmt,
+ std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::June}});
+ check(loc,
+ SV("%b=' 7月'\t%B='7月'\t%h=' 7月'\t%m='07'\t%Om='07'\t%d='31'\t%e='31'\t%Od='31'\t%Oe='31'\n"),
+ lfmt,
+ std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::July}});
+ check(loc,
+ SV("%b=' 8月'\t%B='8月'\t%h=' 8月'\t%m='08'\t%Om='08'\t%d='31'\t%e='31'\t%Od='31'\t%Oe='31'\n"),
+ lfmt,
+ std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::August}});
+ check(loc,
+ SV("%b=' 9月'\t%B='9月'\t%h=' 9月'\t%m='09'\t%Om='09'\t%d='30'\t%e='30'\t%Od='30'\t%Oe='30'\n"),
+ lfmt,
+ std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::September}});
+ check(loc,
+ SV("%b='10月'\t%B='10月'\t%h='10月'\t%m='10'\t%Om='10'\t%d='31'\t%e='31'\t%Od='31'\t%Oe='31'\n"),
+ lfmt,
+ std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::October}});
+ check(loc,
+ SV("%b='11月'\t%B='11月'\t%h='11月'\t%m='11'\t%Om='11'\t%d='30'\t%e='30'\t%Od='30'\t%Oe='30'\n"),
+ lfmt,
+ std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::November}});
+ check(loc,
+ SV("%b='12月'\t%B='12月'\t%h='12月'\t%m='12'\t%Om='12'\t%d='31'\t%e='31'\t%Od='31'\t%Oe='31'\n"),
+ lfmt,
+ std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::December}});
#elif defined(__APPLE__) // defined(_WIN32)
check(loc,
SV("%b=' 1'\t%B='1月'\t%h=' 1'\t%m='01'\t%Om='01'\t%d='31'\t%e='31'\t%Od='31'\t%Oe='31'\n"),
@@ -715,14 +762,14 @@ static void test_valid_ymd_values() {
"%V='05'\t"
"%w='6'\t"
"%W='04'\t"
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
"%x='31.01.1970'\t"
#else
"%x='31/01/1970'\t"
#endif
"%y='70'\t"
"%Y='1970'\t"
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
"%Ex='31.01.1970'\t"
#else
"%Ex='31/01/1970'\t"
@@ -752,14 +799,14 @@ static void test_valid_ymd_values() {
"%V='23'\t"
"%w='1'\t"
"%W='22'\t"
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
"%x='31.05.2004'\t"
#else
"%x='31/05/2004'\t"
#endif
"%y='04'\t"
"%Y='2004'\t"
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
"%Ex='31.05.2004'\t"
#else
"%Ex='31/05/2004'\t"
@@ -791,14 +838,14 @@ static void test_valid_ymd_values() {
"%V='05'\t"
"%w='6'\t"
"%W='04'\t"
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%x='1970/01/31'\t"
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%x='1970年01月31日'\t"
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%y='70'\t"
"%Y='1970'\t"
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%Ex='1970/01/31'\t"
"%EC='19'\t"
"%Ey='70'\t"
@@ -809,7 +856,7 @@ static void test_valid_ymd_values() {
"%Ow='6'\t"
"%OW='04'\t"
"%Oy='70'\t"
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%Ex='昭和45年01月31日'\t"
"%EC='昭和'\t"
"%Ey='45'\t"
@@ -820,7 +867,7 @@ static void test_valid_ymd_values() {
"%Ow='六'\t"
"%OW='四'\t"
"%Oy='七十'\t"
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"\n"),
lfmt,
std::chrono::year_month_day_last{std::chrono::year{1970}, std::chrono::month_day_last{std::chrono::January}});
@@ -838,14 +885,14 @@ static void test_valid_ymd_values() {
"%V='23'\t"
"%w='1'\t"
"%W='22'\t"
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%x='2004/05/31'\t"
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%x='2004年05月31日'\t"
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%y='04'\t"
"%Y='2004'\t"
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%Ex='2004/05/31'\t"
"%EC='20'\t"
"%Ey='04'\t"
@@ -856,7 +903,7 @@ static void test_valid_ymd_values() {
"%Ow='1'\t"
"%OW='22'\t"
"%Oy='04'\t"
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%Ex='平成16年05月31日'\t"
"%EC='平成'\t"
"%Ey='16'\t"
@@ -867,7 +914,7 @@ static void test_valid_ymd_values() {
"%Ow='一'\t"
"%OW='二十二'\t"
"%Oy='四'\t"
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"\n"),
lfmt,
std::chrono::year_month_day_last{std::chrono::year{2004}, std::chrono::month_day_last{std::chrono::May}});
diff --git a/libcxx/test/std/time/time.syn/formatter.year_month_weekday.pass.cpp b/libcxx/test/std/time/time.syn/formatter.year_month_weekday.pass.cpp
index 63e3fc7bb9d31b..fcf0acc926d125 100644
--- a/libcxx/test/std/time/time.syn/formatter.year_month_weekday.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.year_month_weekday.pass.cpp
@@ -5,8 +5,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-FREEBSD-FIXME
-
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-localization
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -328,7 +326,7 @@ static void test_valid_md_values() {
std::chrono::year_month_weekday{
std::chrono::year{1970}, std::chrono::December, std::chrono::weekday_indexed{std::chrono::weekday{7}, 3}});
-#elif defined(_AIX) // defined(_WIN32)
+#elif defined(_AIX) // defined(_WIN32)
check(loc,
SV("%b='1月'\t%B='1月'\t%h='1月'\t%m='01'\t%Om='01'\t%d='01'\t%e=' 1'\t%Od='01'\t%Oe=' 1'\n"),
lfmt,
@@ -354,6 +352,18 @@ static void test_valid_md_values() {
std::chrono::year_month_weekday{
std::chrono::year{1970}, std::chrono::December, std::chrono::weekday_indexed{std::chrono::weekday{7}, 3}});
+#elif defined(__FreeBSD__) // defined(_WIN32)
+ check(loc,
+ SV("%b=' 1月'\t%B='1月'\t%h=' 1月'\t%m='01'\t%Om='01'\t%d='01'\t%e=' 1'\t%Od='01'\t%Oe=' 1'\n"),
+ lfmt,
+ std::chrono::year_month_weekday{
+ std::chrono::year{1970}, std::chrono::January, std::chrono::weekday_indexed{std::chrono::weekday{4}, 1}});
+
+ check(loc,
+ SV("%b='12月'\t%B='12月'\t%h='12月'\t%m='12'\t%Om='12'\t%d='20'\t%e='20'\t%Od='20'\t%Oe='20'\n"),
+ lfmt,
+ std::chrono::year_month_weekday{
+ std::chrono::year{1970}, std::chrono::December, std::chrono::weekday_indexed{std::chrono::weekday{7}, 3}});
#else // defined(_WIN32)
check(loc,
SV("%b=' 1月'\t%B='1月'\t%h=' 1月'\t%m='01'\t%Om='一'\t%d='01'\t%e=' 1'\t%Od='一'\t%Oe='一'\n"),
@@ -507,14 +517,14 @@ static void test_valid_ymd_values() {
"%V='01'\t"
"%w='4'\t"
"%W='00'\t"
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
"%x='01.01.1970'\t"
#else
"%x='01/01/1970'\t"
#endif
"%y='70'\t"
"%Y='1970'\t"
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
"%Ex='01.01.1970'\t"
#else
"%Ex='01/01/1970'\t"
@@ -545,14 +555,14 @@ static void test_valid_ymd_values() {
"%V='22'\t"
"%w='6'\t"
"%W='21'\t"
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
"%x='29.05.2004'\t"
#else
"%x='29/05/2004'\t"
#endif
"%y='04'\t"
"%Y='2004'\t"
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
"%Ex='29.05.2004'\t"
#else
"%Ex='29/05/2004'\t"
@@ -585,14 +595,14 @@ static void test_valid_ymd_values() {
"%V='01'\t"
"%w='4'\t"
"%W='00'\t"
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%x='1970/01/01'\t"
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%x='1970年01月01日'\t"
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%y='70'\t"
"%Y='1970'\t"
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%Ex='1970/01/01'\t"
"%EC='19'\t"
"%Ey='70'\t"
@@ -603,7 +613,7 @@ static void test_valid_ymd_values() {
"%Ow='4'\t"
"%OW='00'\t"
"%Oy='70'\t"
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%Ex='昭和45年01月01日'\t"
"%EC='昭和'\t"
"%Ey='45'\t"
@@ -614,7 +624,7 @@ static void test_valid_ymd_values() {
"%Ow='四'\t"
"%OW='〇'\t"
"%Oy='七十'\t"
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"\n"),
lfmt,
std::chrono::year_month_weekday{
@@ -633,14 +643,14 @@ static void test_valid_ymd_values() {
"%V='22'\t"
"%w='6'\t"
"%W='21'\t"
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%x='2004/05/29'\t"
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%x='2004年05月29日'\t"
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%y='04'\t"
"%Y='2004'\t"
-#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%Ex='2004/05/29'\t"
"%EC='20'\t"
"%Ey='04'\t"
@@ -651,7 +661,7 @@ static void test_valid_ymd_values() {
"%Ow='6'\t"
"%OW='21'\t"
"%Oy='04'\t"
-#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"%Ex='平成16年05月29日'\t"
"%EC='平成'\t"
"%Ey='16'\t"
@@ -662,7 +672,7 @@ static void test_valid_ymd_values() {
"%Ow='六'\t"
"%OW='二十一'\t"
"%Oy='四'\t"
-#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
+#endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
"\n"),
lfmt,
std::chrono::year_month_weekday{
More information about the libcxx-commits
mailing list