Skip to content

Commit e4d4cfa

Browse files
authored
[libc++] Fixes time formatter test output for Linux on PowerPC (#75526)
Fix output to match actual.
1 parent 61b13e0 commit e4d4cfa

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,9 @@ static void test_valid_values_date_time() {
821821
// Use the global locale (fr_FR)
822822
check(
823823
// https://sourceware.org/bugzilla/show_bug.cgi?id=24054
824-
#if defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 29
824+
#if defined(__powerpc__) && defined(__linux__)
825+
SV("%c='jeu. 01 janv. 1970 00:00:00 UTC'\t%Ec='jeu. 01 janv. 1970 00:00:00 UTC'\n"),
826+
#elif defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 29
825827
SV("%c='jeu. 01 janv. 1970 00:00:00 GMT'\t%Ec='jeu. 01 janv. 1970 00:00:00 GMT'\n"),
826828
#elif defined(_AIX)
827829
SV("%c=' 1 janvier 1970 à 00:00:00 UTC'\t%Ec=' 1 janvier 1970 à 00:00:00 UTC'\n"),
@@ -839,7 +841,9 @@ static void test_valid_values_date_time() {
839841

840842
check(
841843
// https://sourceware.org/bugzilla/show_bug.cgi?id=24054
842-
#if defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 29
844+
#if defined(__powerpc__) && defined(__linux__)
845+
SV("%c='ven. 13 févr. 2009 23:31:30 UTC'\t%Ec='ven. 13 févr. 2009 23:31:30 UTC'\n"),
846+
#elif defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 29
843847
SV("%c='ven. 13 févr. 2009 23:31:30 GMT'\t%Ec='ven. 13 févr. 2009 23:31:30 GMT'\n"),
844848
#elif defined(_AIX)
845849
SV("%c='13 février 2009 à 23:31:30 UTC'\t%Ec='13 février 2009 à 23:31:30 UTC'\n"),

libcxx/test/std/time/time.syn/formatter.local_time.pass.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,9 @@ static void test_valid_values_date_time() {
820820
// Use the global locale (fr_FR)
821821
check(
822822
// https://sourceware.org/bugzilla/show_bug.cgi?id=24054
823-
#if defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 29
823+
#if defined(__powerpc__) && defined(__linux__)
824+
SV("%c='jeu. 01 janv. 1970 00:00:00 UTC'\t%Ec='jeu. 01 janv. 1970 00:00:00 UTC'\n"),
825+
#elif defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 29
824826
SV("%c='jeu. 01 janv. 1970 00:00:00 GMT'\t%Ec='jeu. 01 janv. 1970 00:00:00 GMT'\n"),
825827
#elif defined(_AIX)
826828
SV("%c=' 1 janvier 1970 à 00:00:00 UTC'\t%Ec=' 1 janvier 1970 à 00:00:00 UTC'\n"),
@@ -838,7 +840,9 @@ static void test_valid_values_date_time() {
838840

839841
check(
840842
// https://sourceware.org/bugzilla/show_bug.cgi?id=24054
841-
#if defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 29
843+
#if defined(__powerpc__) && defined(__linux__)
844+
SV("%c='ven. 13 févr. 2009 23:31:30 UTC'\t%Ec='ven. 13 févr. 2009 23:31:30 UTC'\n"),
845+
#elif defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 29
842846
SV("%c='ven. 13 févr. 2009 23:31:30 GMT'\t%Ec='ven. 13 févr. 2009 23:31:30 GMT'\n"),
843847
#elif defined(_AIX)
844848
SV("%c='13 février 2009 à 23:31:30 UTC'\t%Ec='13 février 2009 à 23:31:30 UTC'\n"),

libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,9 @@ static void test_valid_values_date_time() {
817817
// Use the global locale (fr_FR)
818818
check(
819819
// https://sourceware.org/bugzilla/show_bug.cgi?id=24054
820-
#if defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 29
820+
#if defined(__powerpc__) && defined(__linux__)
821+
SV("%c='jeu. 01 janv. 1970 00:00:00 UTC'\t%Ec='jeu. 01 janv. 1970 00:00:00 UTC'\n"),
822+
#elif defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 29
821823
SV("%c='jeu. 01 janv. 1970 00:00:00 GMT'\t%Ec='jeu. 01 janv. 1970 00:00:00 GMT'\n"),
822824
#elif defined(_AIX)
823825
SV("%c=' 1 janvier 1970 à 00:00:00 UTC'\t%Ec=' 1 janvier 1970 à 00:00:00 UTC'\n"),
@@ -835,7 +837,9 @@ static void test_valid_values_date_time() {
835837

836838
check(
837839
// https://sourceware.org/bugzilla/show_bug.cgi?id=24054
838-
#if defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 29
840+
#if defined(__powerpc__) && defined(__linux__)
841+
SV("%c='ven. 13 févr. 2009 23:31:30 UTC'\t%Ec='ven. 13 févr. 2009 23:31:30 UTC'\n"),
842+
#elif defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 29
839843
SV("%c='ven. 13 févr. 2009 23:31:30 GMT'\t%Ec='ven. 13 févr. 2009 23:31:30 GMT'\n"),
840844
#elif defined(_AIX)
841845
SV("%c='13 février 2009 à 23:31:30 UTC'\t%Ec='13 février 2009 à 23:31:30 UTC'\n"),

0 commit comments

Comments
 (0)