[glib/fix-glib-win32-test] glib/tests/win32.c: Fix test variable types
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/fix-glib-win32-test] glib/tests/win32.c: Fix test variable types
- Date: Tue, 4 Jun 2019 10:19:42 +0000 (UTC)
commit aa63eaecaf17ba968df3f3d0665591a9d14141de
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Jun 4 18:02:23 2019 +0800
glib/tests/win32.c: Fix test variable types
The variable types for the PID (bp) and event (be) are accidentally
reversed in the test program. Correct their types so that tests do not
fail on Visual Studio x64 builds.
Fixes issue #1797
glib/tests/win32.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glib/tests/win32.c b/glib/tests/win32.c
index d4b1fc523..a6ba4e261 100644
--- a/glib/tests/win32.c
+++ b/glib/tests/win32.c
@@ -39,8 +39,8 @@ test_subst_pid_and_event (void)
gchar debugger_enough[G_N_ELEMENTS (not_enough) + 1];
gchar debugger_big[65535] = {0};
gchar *output;
- DWORD be = 0xFFFFFFFF;
- guintptr bp = (guintptr) G_MAXSIZE;
+ guintptr be = (guintptr) 0xFFFFFFFF;
+ DWORD bp = G_MAXSIZE;
/* %f is not valid */
g_assert_false (_g_win32_subst_pid_and_event (debugger_3, G_N_ELEMENTS (debugger_3),
@@ -59,7 +59,7 @@ test_subst_pid_and_event (void)
g_assert_true (_g_win32_subst_pid_and_event (debugger_big, G_N_ELEMENTS (debugger_big),
"multipl%e big %e %entries and %pids are %provided here",
bp, be));
- output = g_strdup_printf ("multipl%lu big %lu %luntries and %lluids are %llurovided here", be, be, be,
(guint64) bp, (guint64) bp);
+ output = g_strdup_printf ("multipl%llu big %llu %lluntries and %luids are %lurovided here", (guint64) be,
(guint64) be, (guint64) be, bp, bp);
g_assert_cmpstr (debugger_big, ==, output);
g_free (output);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]