[glib] settings: Improve test coverage



commit 43806fca693cb2b12d6f50b0ec38f5e2ed8022c5
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Apr 8 10:20:46 2012 -0400

    settings: Improve test coverage

 gio/tests/gsettings.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/gsettings.c b/gio/tests/gsettings.c
index 1b1f0c6..c7fe376 100644
--- a/gio/tests/gsettings.c
+++ b/gio/tests/gsettings.c
@@ -970,6 +970,7 @@ test_simple_binding (void)
   gboolean b;
   gchar y;
   gint i;
+  guint u;
   gint16 n;
   guint16 q;
   gint n2;
@@ -1049,6 +1050,16 @@ test_simple_binding (void)
   g_object_get (obj, "int", &i, NULL);
   g_assert_cmpint (i, ==, 54321);
 
+  g_settings_bind (settings, "uint", obj, "uint", G_SETTINGS_BIND_DEFAULT);
+
+  g_object_set (obj, "uint", 12345, NULL);
+  g_assert_cmpuint (g_settings_get_uint (settings, "uint"), ==, 12345);
+
+  g_settings_set_uint (settings, "uint", 54321);
+  u = 1111;
+  g_object_get (obj, "uint", &u, NULL);
+  g_assert_cmpuint (u, ==, 54321);
+
   g_settings_bind (settings, "int64", obj, "int64", G_SETTINGS_BIND_DEFAULT);
 
   g_object_set (obj, "int64", (gint64) G_MAXINT64, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]