[gom] tests: Finish the work from 1785a3c4b61c5860a94a84faf0b98ef46a327342



commit 5907fba433e622620d61c14057ddc5c0e2ebb416
Author: Bastien Nocera <hadess hadess net>
Date:   Sat May 10 18:00:29 2014 +0200

    tests: Finish the work from 1785a3c4b61c5860a94a84faf0b98ef46a327342
    
    4 more g_str_match_string() to be done...

 tests/test-gom-constraints.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/tests/test-gom-constraints.c b/tests/test-gom-constraints.c
index a2e42df..d2ea154 100644
--- a/tests/test-gom-constraints.c
+++ b/tests/test-gom-constraints.c
@@ -1,3 +1,4 @@
+#include <string.h>
 #include <gom/gom.h>
 #include <glib/gstdio.h>
 
@@ -263,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_true (g_str_match_string ("NOT NULL", error->message, FALSE));
-  g_assert_true (g_str_match_string ("items.name", error->message, FALSE));
+  g_assert_nonnull (strstr (error->message, "NOT NULL"));
+  g_assert_nonnull (strstr (error->message, "items.name"));
   g_clear_error(&error);
   g_object_unref(item);
 
@@ -274,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_true (g_str_match_string ("NOT NULL", error->message, FALSE));
-  g_assert_true (g_str_match_string ("items.email", error->message, FALSE));
+  g_assert_nonnull (strstr (error->message, "NOT NULL"));
+  g_assert_nonnull (strstr (error->message, "items.email"));
   g_clear_error(&error);
   g_object_unref(item);
 


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