[glib] tests: fix uint64 argument to g_object_set() call
- From: Allison Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] tests: fix uint64 argument to g_object_set() call
- Date: Thu, 23 Jun 2016 15:53:38 +0000 (UTC)
commit 9bb2499c9c8be9c401d32fd7930ea0b975678db0
Author: Allison Lortie <desrt desrt ca>
Date: Thu Jun 23 11:47:30 2016 -0400
tests: fix uint64 argument to g_object_set() call
5cea1c861def0251a10cd4de01908aaf3276c72d introduced accessors for 64bit
ints to gsettings, at which point the testcases were expanded.
Unfortunately, the expanded tests contained a bug: integer constants
passed to g_object_set() for a 64-bit property need an up-cast. Add
that now.
Problem found by Iain Lane.
gio/tests/gsettings.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/tests/gsettings.c b/gio/tests/gsettings.c
index 86cc85c..1fbfb94 100644
--- a/gio/tests/gsettings.c
+++ b/gio/tests/gsettings.c
@@ -1182,7 +1182,7 @@ test_simple_binding (void)
g_settings_bind (settings, "uint64", obj, "uint64", G_SETTINGS_BIND_DEFAULT);
- g_object_set (obj, "uint64", 12345, NULL);
+ g_object_set (obj, "uint64", (guint64) 12345, NULL);
g_assert_cmpuint (g_settings_get_uint64 (settings, "uint64"), ==, 12345);
g_settings_set_uint64 (settings, "uint64", 54321);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]