Skip to content

Commit 83c2aa4

Browse files
committed
[libcxx] [test] Fix locale.time.get.byname get_date and get_date_wide on Windows
Also apply the same fix on glibc. This takes the test one step closer to passing on glibc, but it still fails on the zh_CN test (which requires a more involved fix in libc++ itself). Differential Revision: https://reviews.llvm.org/D119791
1 parent f081cc5 commit 83c2aa4

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@
1414
// REQUIRES: locale.ru_RU.UTF-8
1515
// REQUIRES: locale.zh_CN.UTF-8
1616

17-
// GLIBC Expects "10/06/2009" for fr_FR as opposed to "10.06.2009"
18-
// GLIBC also fails on the zh_CN test.
17+
// GLIBC fails on the zh_CN test.
1918
// XFAIL: linux
2019

21-
// XFAIL: LIBCXX-WINDOWS-FIXME
22-
2320
// <locale>
2421

2522
// class time_get_byname<charT, InputIterator>
@@ -66,7 +63,11 @@ int main(int, char**)
6663
}
6764
{
6865
const my_facet f(LOCALE_fr_FR_UTF_8, 1);
66+
#if defined(_WIN32) || defined(TEST_HAS_GLIBC)
67+
const char in[] = "10/06/2009";
68+
#else
6969
const char in[] = "10.06.2009";
70+
#endif
7071
err = std::ios_base::goodbit;
7172
t = std::tm();
7273
I i = f.get_date(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t);

libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@
1616
// REQUIRES: locale.ru_RU.UTF-8
1717
// REQUIRES: locale.zh_CN.UTF-8
1818

19-
// GLIBC Expects "10/06/2009" for fr_FR as opposed to "10.06.2009"
20-
// GLIBC also fails on the zh_CN test.
19+
// GLIBC fails on the zh_CN test.
2120
// XFAIL: linux
2221

23-
// XFAIL: LIBCXX-WINDOWS-FIXME
24-
2522
// <locale>
2623

2724
// class time_get_byname<charT, InputIterator>
@@ -68,7 +65,11 @@ int main(int, char**)
6865
}
6966
{
7067
const my_facet f(LOCALE_fr_FR_UTF_8, 1);
68+
#if defined(_WIN32) || defined(TEST_HAS_GLIBC)
69+
const wchar_t in[] = L"10/06/2009";
70+
#else
7171
const wchar_t in[] = L"10.06.2009";
72+
#endif
7273
err = std::ios_base::goodbit;
7374
t = std::tm();
7475
I i = f.get_date(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t);

0 commit comments

Comments
 (0)