[json-glib] test-serialize-full: Remove the dummy deserialize implementation
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] test-serialize-full: Remove the dummy deserialize implementation
- Date: Sat, 25 Sep 2010 11:00:05 +0000 (UTC)
commit d480f2e77e3dc0d00fc617686b306f96353b7177
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Sat Sep 25 11:49:41 2010 +0100
test-serialize-full: Remove the dummy deserialize implementation
If you don't override JsonSerializable, you get the default behaviour
anyway.
tests/test-serialize-full.c | 15 +--------------
1 files changed, 1 insertions(+), 14 deletions(-)
---
diff --git a/tests/test-serialize-full.c b/tests/test-serialize-full.c
index 2ef22d6..704fb18 100644
--- a/tests/test-serialize-full.c
+++ b/tests/test-serialize-full.c
@@ -126,18 +126,6 @@ G_DEFINE_TYPE_WITH_CODE (TestObject, test_object, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (JSON_TYPE_SERIALIZABLE,
json_serializable_iface_init));
-static gboolean
-test_object_deserialize_property (JsonSerializable *serializable,
- const gchar *name,
- GValue *value,
- GParamSpec *pspec,
- JsonNode *node)
-{
- gboolean retval = FALSE;
-
- return retval;
-}
-
static JsonNode *
test_object_serialize_property (JsonSerializable *serializable,
const gchar *name,
@@ -184,7 +172,6 @@ json_serializable_iface_init (gpointer g_iface)
JsonSerializableIface *iface = g_iface;
iface->serialize_property = test_object_serialize_property;
- iface->deserialize_property = test_object_deserialize_property;
}
static void
@@ -382,7 +369,7 @@ test_deserialize (void)
TEST_OBJECT (object)->meh == TEST_ENUM_BAZ ? "<true>" : "<false>");
g_assert_cmpint (TEST_OBJECT (object)->foo, ==, 42);
- g_assert_cmpint (TEST_OBJECT (object)->bar, ==, TRUE);
+ g_assert (TEST_OBJECT (object)->bar);
g_assert_cmpstr (TEST_OBJECT (object)->baz, ==, "hello");
g_assert_cmpint (TEST_OBJECT (object)->meh, ==, TEST_ENUM_BAZ);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]