[glib: 4/6] glib/tests: skip test that aborts with plain Windows UCRT
- From: Nirbheek Chauhan <nirbheekc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 4/6] glib/tests: skip test that aborts with plain Windows UCRT
- Date: Thu, 10 Feb 2022 09:43:27 +0000 (UTC)
commit 6d21ff6305ab00613a37f8786cbadf1e0f2f0503
Author: Marc-André Lureau <marcandre lureau redhat com>
Date: Tue Jan 25 12:07:33 2022 +0400
glib/tests: skip test that aborts with plain Windows UCRT
setlocale() asserts on LC_MESSAGES:
minkernel\crts\ucrt\src\appcrt\locale\wsetlocale.cpp(448) : Assertion failed: LC_MIN <= _category &&
_category <= LC_MAX
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale
https://developercommunity.visualstudio.com/t/setlocale-assert-on-invalid-category/1646244
(apparently, MinGW wraps or reimplements the call)
Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>
glib/tests/gdatetime.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
index a09ae7ee8..3a7bbb220 100644
--- a/glib/tests/gdatetime.c
+++ b/glib/tests/gdatetime.c
@@ -2365,6 +2365,9 @@ check_and_set_locale (int category,
static void
test_format_time_mixed_utf8 (gconstpointer data)
{
+#ifdef _MSC_VER
+ g_test_skip ("setlocale (LC_MESSAGES) asserts on ucrt");
+#else
const MixedUtf8TestData *test_data;
gchar *old_time_locale;
gchar *old_messages_locale;
@@ -2430,6 +2433,7 @@ test_format_time_mixed_utf8 (gconstpointer data)
setlocale (LC_MESSAGES, old_messages_locale);
g_free (old_time_locale);
g_free (old_messages_locale);
+#endif
}
#pragma GCC diagnostic push
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]