[json-glib] tests: Use properties to change values
- From: Emmanuele Bassi <ebassi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [json-glib] tests: Use properties to change values
- Date: Tue, 27 Oct 2009 11:31:48 +0000 (UTC)
commit 3a2176ebf96b33716d1b50068ca44b1d3cd9b0c8
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Tue Oct 27 11:29:32 2009 +0000
tests: Use properties to change values
The values inside _init() should match the default values of the
properties as specified by the GParamSpec. If we want to verify
a non-default value we should specify the value when instantiating
the object.
tests/test-serialize-simple.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/test-serialize-simple.c b/tests/test-serialize-simple.c
index 6006919..fd52331 100644
--- a/tests/test-serialize-simple.c
+++ b/tests/test-serialize-simple.c
@@ -129,14 +129,14 @@ static void
test_object_init (TestObject *object)
{
object->foo = 42;
- object->bar = TRUE;
+ object->bar = FALSE;
object->baz = g_strdup ("Test");
}
static void
test_serialize (void)
{
- TestObject *obj = g_object_new (TEST_TYPE_OBJECT, NULL);
+ TestObject *obj = g_object_new (TEST_TYPE_OBJECT, "bar", TRUE, NULL);
gchar *data;
gsize len;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]