[gom] tests: Don't use g_assert_nonnull()
- From: Mathieu Bridon <mbridon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gom] tests: Don't use g_assert_nonnull()
- Date: Sat, 10 May 2014 16:43:11 +0000 (UTC)
commit 6fb76a81314ce919960aafcecc566f20dee6120e
Author: Mathieu Bridon <bochecha fedoraproject org>
Date: Sun May 11 00:14:52 2014 +0800
tests: Don't use g_assert_nonnull()
Which downgrades the run-time requirements of gom (g_assert_nonnull()
is only available in glib 2.40).
tests/test-gom-constraints.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/tests/test-gom-constraints.c b/tests/test-gom-constraints.c
index d2ea154..d866b11 100644
--- a/tests/test-gom-constraints.c
+++ b/tests/test-gom-constraints.c
@@ -227,8 +227,8 @@ test_unique (void)
NULL);
gom_resource_save_sync(GOM_RESOURCE(item), &error);
g_assert_error(error, GOM_ERROR, GOM_ERROR_COMMAND_SQLITE);
- g_assert_nonnull (strstr (error->message, "UNIQUE"));
- g_assert_nonnull (strstr (error->message, "items.email"));
+ g_assert (strstr (error->message, "UNIQUE") != NULL);
+ g_assert (strstr (error->message, "items.email") != NULL);
g_object_unref(item);
g_clear_error(&error);
@@ -264,8 +264,8 @@ test_notnull (void)
NULL);
gom_resource_save_sync(GOM_RESOURCE(item), &error);
g_assert_error(error, GOM_ERROR, GOM_ERROR_COMMAND_SQLITE);
- g_assert_nonnull (strstr (error->message, "NOT NULL"));
- g_assert_nonnull (strstr (error->message, "items.name"));
+ g_assert (strstr (error->message, "NOT NULL") != NULL);
+ g_assert (strstr (error->message, "items.name") != NULL);
g_clear_error(&error);
g_object_unref(item);
@@ -275,8 +275,8 @@ test_notnull (void)
NULL);
gom_resource_save_sync(GOM_RESOURCE(item), &error);
g_assert_error(error, GOM_ERROR, GOM_ERROR_COMMAND_SQLITE);
- g_assert_nonnull (strstr (error->message, "NOT NULL"));
- g_assert_nonnull (strstr (error->message, "items.email"));
+ g_assert (strstr (error->message, "NOT NULL") != NULL);
+ g_assert (strstr (error->message, "items.email") != NULL);
g_clear_error(&error);
g_object_unref(item);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]