[gom] tests: Don't use g_str_match_string()



commit 1785a3c4b61c5860a94a84faf0b98ef46a327342
Author: Bastien Nocera <hadess hadess net>
Date:   Sat May 10 17:55:09 2014 +0200

    tests: Don't use g_str_match_string()
    
    Which downgrades the run-time requirements of gom (g_str_match_string()
    is only available in glib 2.40).
    
    Spotted by Mathieu Bridon <bochecha fedoraproject org>

 tests/test-gom-constraints.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/test-gom-constraints.c b/tests/test-gom-constraints.c
index 61e9e19..a2e42df 100644
--- a/tests/test-gom-constraints.c
+++ b/tests/test-gom-constraints.c
@@ -226,8 +226,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_true (g_str_match_string ("UNIQUE", error->message, FALSE));
-  g_assert_true (g_str_match_string ("items.email", error->message, FALSE));
+  g_assert_nonnull (strstr (error->message, "UNIQUE"));
+  g_assert_nonnull (strstr (error->message, "items.email"));
   g_object_unref(item);
   g_clear_error(&error);
 


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