[libcxx-commits] [PATCH] D119791: [libcxx] [test] Fix locale.time.get.byname get_date and get_date_wide on Windows
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 17 00:55:24 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG83c2aa467e22: [libcxx] [test] Fix locale.time.get.byname get_date and get_date_wide on Windows (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119791/new/
https://reviews.llvm.org/D119791
Files:
libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
@@ -16,12 +16,9 @@
// REQUIRES: locale.ru_RU.UTF-8
// REQUIRES: locale.zh_CN.UTF-8
-// GLIBC Expects "10/06/2009" for fr_FR as opposed to "10.06.2009"
-// GLIBC also fails on the zh_CN test.
+// GLIBC fails on the zh_CN test.
// XFAIL: linux
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// <locale>
// class time_get_byname<charT, InputIterator>
@@ -68,7 +65,11 @@
}
{
const my_facet f(LOCALE_fr_FR_UTF_8, 1);
+#if defined(_WIN32) || defined(TEST_HAS_GLIBC)
+ const wchar_t in[] = L"10/06/2009";
+#else
const wchar_t in[] = L"10.06.2009";
+#endif
err = std::ios_base::goodbit;
t = std::tm();
I i = f.get_date(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t);
Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
@@ -14,12 +14,9 @@
// REQUIRES: locale.ru_RU.UTF-8
// REQUIRES: locale.zh_CN.UTF-8
-// GLIBC Expects "10/06/2009" for fr_FR as opposed to "10.06.2009"
-// GLIBC also fails on the zh_CN test.
+// GLIBC fails on the zh_CN test.
// XFAIL: linux
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// <locale>
// class time_get_byname<charT, InputIterator>
@@ -66,7 +63,11 @@
}
{
const my_facet f(LOCALE_fr_FR_UTF_8, 1);
+#if defined(_WIN32) || defined(TEST_HAS_GLIBC)
+ const char in[] = "10/06/2009";
+#else
const char in[] = "10.06.2009";
+#endif
err = std::ios_base::goodbit;
t = std::tm();
I i = f.get_date(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119791.409518.patch
Type: text/x-patch
Size: 2239 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220217/67e5f51b/attachment.bin>
More information about the libcxx-commits
mailing list