[epiphany/mcatanzaro/purge-gassert: 3/3] Purge g_assert() under tests/



commit cfa5805365f1604fd7a76314c9632b3cd0d81960
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Mon Jan 7 22:02:32 2019 -0600

    Purge g_assert() under tests/
    
    The documentation of g_assert() says it is not intended for use in
    tests.

 tests/ephy-download-test.c         |  6 +--
 tests/ephy-embed-shell-test.c      |  2 +-
 tests/ephy-embed-utils-test.c      |  6 +--
 tests/ephy-encodings-test.c        | 12 +++---
 tests/ephy-file-helpers-test.c     | 52 +++++++++++++-------------
 tests/ephy-history-test.c          | 41 ++++++++++----------
 tests/ephy-location-entry-test.c   |  6 +--
 tests/ephy-session-test.c          | 50 ++++++++++++-------------
 tests/ephy-shell-test.c            | 30 +++++++--------
 tests/ephy-snapshot-service-test.c |  2 +-
 tests/ephy-sqlite-test.c           | 76 +++++++++++++++++++-------------------
 tests/ephy-web-app-utils-test.c    | 30 +++++++--------
 tests/ephy-web-view-test.c         | 19 +++++-----
 13 files changed, 165 insertions(+), 167 deletions(-)
---
diff --git a/tests/ephy-download-test.c b/tests/ephy-download-test.c
index 6d69b26f1..ea5643ae4 100644
--- a/tests/ephy-download-test.c
+++ b/tests/ephy-download-test.c
@@ -123,14 +123,14 @@ static void
 completed_cb (EphyDownload *download,
               Fixture      *fixture)
 {
-  g_assert (test_file_was_downloaded (download));
+  g_assert_true (test_file_was_downloaded (download));
   g_main_loop_quit (fixture->loop);
 }
 
 static void
 test_ephy_download_new (Fixture *fixture, gconstpointer data)
 {
-  g_assert (EPHY_IS_DOWNLOAD (fixture->download));
+  g_assert_true (EPHY_IS_DOWNLOAD (fixture->download));
 }
 
 static void
@@ -139,7 +139,7 @@ test_ephy_download_new_for_uri (Fixture *fixture, gconstpointer data)
   WebKitDownload *download = ephy_download_get_webkit_download (fixture->download);
   WebKitURIRequest *request = webkit_download_get_request (download);
 
-  g_assert (request);
+  g_assert_nonnull (request);
   g_assert_cmpstr (fixture->source, ==, webkit_uri_request_get_uri (request));
 }
 
diff --git a/tests/ephy-embed-shell-test.c b/tests/ephy-embed-shell-test.c
index e305434c2..e704964a0 100644
--- a/tests/ephy-embed-shell-test.c
+++ b/tests/ephy-embed-shell-test.c
@@ -67,7 +67,7 @@ test_ephy_embed_shell_web_view_created (void)
                     G_CALLBACK (web_view_created_cb), &web_view_created);
 
   view = ephy_web_view_new ();
-  g_assert (web_view_created);
+  g_assert_true (web_view_created);
   gtk_widget_destroy (view);
 }
 
diff --git a/tests/ephy-embed-utils-test.c b/tests/ephy-embed-utils-test.c
index 64d6ee0b5..d921bac01 100644
--- a/tests/ephy-embed-utils-test.c
+++ b/tests/ephy-embed-utils-test.c
@@ -101,13 +101,13 @@ static const IsEmptyTest tests_is_empty[] = {
 static void
 test_address_no_web_scheme (const char *test)
 {
-  g_assert (ephy_embed_utils_address_has_web_scheme (test) == FALSE);
+  g_assert_false (ephy_embed_utils_address_has_web_scheme (test));
 }
 
 static void
 test_address_has_web_scheme (const char *test)
 {
-  g_assert (ephy_embed_utils_address_has_web_scheme (test) == TRUE);
+  g_assert_true (ephy_embed_utils_address_has_web_scheme (test));
 }
 
 static void
@@ -124,7 +124,7 @@ test_normalize_address (const NormalizeTest *test)
 static void
 test_is_empty (const IsEmptyTest *test)
 {
-  g_assert (ephy_embed_utils_url_is_empty (test->test) == test->result);
+  g_assert_true (ephy_embed_utils_url_is_empty (test->test) == test->result);
 }
 
 int
diff --git a/tests/ephy-encodings-test.c b/tests/ephy-encodings-test.c
index d98465e0b..e143b596e 100644
--- a/tests/ephy-encodings-test.c
+++ b/tests/ephy-encodings-test.c
@@ -39,7 +39,7 @@ test_ephy_encodings_create (void)
 
   encoding = ephy_encoding_new ("UTF-8", "Unicode (UTF-8)",
                                 LG_UNICODE);
-  g_assert (encoding);
+  g_assert_nonnull (encoding);
   g_assert_cmpstr (ephy_encoding_get_encoding (encoding), ==, "UTF-8");
   g_assert_cmpstr (ephy_encoding_get_title (encoding), ==, "Unicode (UTF-8)");
   g_assert_cmpstr (ephy_encoding_get_title_elided (encoding), ==, "Unicode (UTF-8)");
@@ -57,16 +57,16 @@ test_ephy_encodings_get (void)
   GList *all, *p;
 
   encodings = ephy_embed_shell_get_encodings (embed_shell);
-  g_assert (encodings);
+  g_assert_nonnull (encodings);
 
   all = ephy_encodings_get_all (encodings);
-  g_assert (all);
+  g_assert_nonnull (all);
   g_assert_cmpint (g_list_length (all), ==, NUM_ENCODINGS);
 
   for (p = all; p; p = p->next) {
     EphyEncoding *encoding = EPHY_ENCODING (p->data);
-    g_assert (encoding);
-    g_assert (EPHY_IS_ENCODING (encoding));
+    g_assert_nonnull (encoding);
+    g_assert_true (EPHY_IS_ENCODING (encoding));
   }
 
   g_list_free (all);
@@ -89,7 +89,7 @@ main (int argc, char *argv[])
   }
 
   _ephy_shell_create_instance (EPHY_EMBED_SHELL_MODE_TEST);
-  g_assert (ephy_shell_get_default ());
+  g_assert_nonnull (ephy_shell_get_default ());
 
   g_test_add_func ("/src/ephy-encodings/create",
                    test_ephy_encodings_create);
diff --git a/tests/ephy-file-helpers-test.c b/tests/ephy-file-helpers-test.c
index 44e6880a7..c2449d0bd 100644
--- a/tests/ephy-file-helpers-test.c
+++ b/tests/ephy-file-helpers-test.c
@@ -65,31 +65,31 @@ test_ephy_file_helpers_init (void)
                     keep_dir ? "TRUE" : "FALSE",
                     ensure_exists ? "TRUE" : "FALSE");
 
-    g_assert (ephy_dot_dir () == NULL);
-    g_assert (ephy_file_helpers_init (NULL, test.flags, NULL));
+    g_assert_null (ephy_dot_dir ());
+    g_assert_true (ephy_file_helpers_init (NULL, test.flags, NULL));
 
     tmp_dir = g_strdup (ephy_file_tmp_dir ());
     dot_dir = g_strdup (ephy_dot_dir ());
 
-    g_assert (tmp_dir != NULL);
-    g_assert (dot_dir != NULL);
+    g_assert_nonnull (tmp_dir);
+    g_assert_nonnull (dot_dir);
 
     /* Should always exist after ephy_file_tmp_dir(). */
-    g_assert (g_file_test (tmp_dir, G_FILE_TEST_EXISTS));
-    g_assert (g_file_test (dot_dir, G_FILE_TEST_EXISTS) == ensure_exists);
+    g_assert_true (g_file_test (tmp_dir, G_FILE_TEST_EXISTS));
+    g_assert_true (g_file_test (dot_dir, G_FILE_TEST_EXISTS) == ensure_exists);
 
     ephy_file_helpers_shutdown ();
 
     /* Private profiles have their dot_dir inside tmp_dir. */
-    g_assert (g_file_test (tmp_dir, G_FILE_TEST_EXISTS) == keep_dir);
-    g_assert (g_file_test (dot_dir, G_FILE_TEST_EXISTS) == (keep_dir && ensure_exists));
+    g_assert_true (g_file_test (tmp_dir, G_FILE_TEST_EXISTS) == keep_dir);
+    g_assert_true (g_file_test (dot_dir, G_FILE_TEST_EXISTS) == (keep_dir && ensure_exists));
 
     /* Cleanup dir left behind. */
     if (keep_dir) {
       /* As a safety measure, only try recursive delete on paths
        * prefixed with /tmp. */
       if (g_str_has_prefix (tmp_dir, "/tmp"))
-        g_assert (ephy_file_delete_dir_recursively (tmp_dir, NULL));
+        g_assert_true (ephy_file_delete_dir_recursively (tmp_dir, NULL));
       else
         g_warning ("INIT: dangerous path returned as tmp_dir: %s", tmp_dir);
     }
@@ -188,16 +188,16 @@ test_ephy_file_create_delete_dir (void)
 
     g_test_message ("DIR: testing for %s", test.dir);
 
-    g_assert (g_file_test (test.dir, G_FILE_TEST_EXISTS) == test.exists);
-    g_assert (ephy_ensure_dir_exists (test.dir, NULL) == (test.exists || test.can_create));
-    g_assert (g_file_test (test.dir, G_FILE_TEST_EXISTS) == (test.exists || test.can_create));
+    g_assert_true (g_file_test (test.dir, G_FILE_TEST_EXISTS) == test.exists);
+    g_assert_true (ephy_ensure_dir_exists (test.dir, NULL) == (test.exists || test.can_create));
+    g_assert_true (g_file_test (test.dir, G_FILE_TEST_EXISTS) == (test.exists || test.can_create));
 
-    g_assert (ephy_file_delete_dir_recursively (test.dir, &error) == test.can_delete);
+    g_assert_true (ephy_file_delete_dir_recursively (test.dir, &error) == test.can_delete);
     if (error)
       g_error_free (error);
 
     if (test.exists)
-      g_assert (g_file_test (test.dir, G_FILE_TEST_EXISTS) != test.can_delete);
+      g_assert_true (g_file_test (test.dir, G_FILE_TEST_EXISTS) != test.can_delete);
   }
 
   ephy_file_helpers_shutdown ();
@@ -234,8 +234,8 @@ test_ephy_file_create_delete_tmp (void)
   tmp_file = ephy_file_tmp_filename ("test-ephy", NULL);
   tmp_path = g_build_filename (ephy_file_tmp_dir (), "test-ephy", NULL);
 
-  g_assert (tmp_file == NULL);
-  g_assert (g_file_test (tmp_path, G_FILE_TEST_EXISTS) == FALSE);
+  g_assert_null (tmp_file);
+  g_assert_false (g_file_test (tmp_path, G_FILE_TEST_EXISTS));
 
   g_free (tmp_path);
   g_free (tmp_file);
@@ -245,14 +245,14 @@ test_ephy_file_create_delete_tmp (void)
   tmp_path = g_build_filename (ephy_file_tmp_dir (), tmp_file, NULL);
 
   g_test_message ("TMP: %s", tmp_path);
-  g_assert (g_file_test (tmp_path, G_FILE_TEST_EXISTS) == FALSE);
-  g_assert (g_file_set_contents (tmp_path, "test", -1, NULL));
-  g_assert (g_file_test (tmp_path, G_FILE_TEST_EXISTS));
+  g_assert_false (g_file_test (tmp_path, G_FILE_TEST_EXISTS));
+  g_assert_true (g_file_set_contents (tmp_path, "test", -1, NULL));
+  g_assert_true (g_file_test (tmp_path, G_FILE_TEST_EXISTS));
 
   tmp_uri = g_filename_to_uri (tmp_path, NULL, NULL);
   ephy_file_delete_uri (tmp_uri);
 
-  g_assert (g_file_test (tmp_path, G_FILE_TEST_EXISTS) == FALSE);
+  g_assert_false (g_file_test (tmp_path, G_FILE_TEST_EXISTS));
 
   g_free (tmp_uri);
   g_free (tmp_path);
@@ -262,20 +262,20 @@ test_ephy_file_create_delete_tmp (void)
   tmp_file = ephy_file_tmp_filename ("test-ephy-XXXXXX", "test-ext");
   tmp_path = g_build_filename (ephy_file_tmp_dir (), tmp_file, NULL);
 
-  g_assert (g_file_test (tmp_path, G_FILE_TEST_EXISTS) == FALSE);
-  g_assert (g_file_set_contents (tmp_path, "test", -1, NULL));
-  g_assert (g_file_test (tmp_path, G_FILE_TEST_EXISTS));
+  g_assert_false (g_file_test (tmp_path, G_FILE_TEST_EXISTS));
+  g_assert_true (g_file_set_contents (tmp_path, "test", -1, NULL));
+  g_assert_true (g_file_test (tmp_path, G_FILE_TEST_EXISTS));
 
   tmp_path_prefix = g_build_filename (ephy_file_tmp_dir (), "test-ephy-", NULL);
 
   g_test_message ("TMP: %s", tmp_path);
-  g_assert (g_str_has_suffix (tmp_path, "test-ext"));
-  g_assert (g_str_has_prefix (tmp_path, tmp_path_prefix));
+  g_assert_true (g_str_has_suffix (tmp_path, "test-ext"));
+  g_assert_true (g_str_has_prefix (tmp_path, tmp_path_prefix));
 
   tmp_uri = g_filename_to_uri (tmp_path, NULL, NULL);
   ephy_file_delete_uri (tmp_uri);
 
-  g_assert (g_file_test (tmp_file, G_FILE_TEST_EXISTS) == FALSE);
+  g_assert_false (g_file_test (tmp_file, G_FILE_TEST_EXISTS));
 
   g_free (tmp_uri);
   g_free (tmp_path_prefix);
diff --git a/tests/ephy-history-test.c b/tests/ephy-history-test.c
index e1d549b87..71f4be20b 100644
--- a/tests/ephy-history-test.c
+++ b/tests/ephy-history-test.c
@@ -49,7 +49,6 @@ static gboolean
 destroy_history_service_and_end_main_loop (EphyHistoryService *service)
 {
   g_object_unref (service);
-  g_assert (TRUE);
   gtk_main_quit ();
 
   return FALSE;
@@ -70,12 +69,12 @@ static void
 page_vist_created (EphyHistoryService *service, gboolean success, gpointer result_data, gpointer user_data)
 {
   if (user_data != NULL) {
-    g_assert (EPHY_IS_HISTORY_SERVICE (user_data));
+    g_assert_true (EPHY_IS_HISTORY_SERVICE (user_data));
     g_object_unref (user_data);
   }
   g_object_unref (service);
-  g_assert (result_data == NULL);
-  g_assert (success);
+  g_assert_null (result_data);
+  g_assert_true (success);
   gtk_main_quit ();
 }
 
@@ -132,15 +131,15 @@ verify_create_history_entry_cb (EphyHistoryService *service, gboolean success, g
   GList *current = visits;
   GList *current_baseline = baseline_visits;
 
-  g_assert (user_data == NULL);
-  g_assert (success);
-  g_assert (visits != NULL);
+  g_assert_null (user_data);
+  g_assert_true (success);
+  g_assert_nonnull (visits);
   g_assert_cmpint (g_list_length (visits), ==, g_list_length (baseline_visits));
 
   while (current_baseline) {
     EphyHistoryPageVisit *visit, *baseline_visit;
 
-    g_assert (current);
+    g_assert_nonnull (current);
     visit = (EphyHistoryPageVisit *)current->data;
     baseline_visit = (EphyHistoryPageVisit *)current_baseline->data;
 
@@ -163,9 +162,9 @@ verify_create_history_entry_cb (EphyHistoryService *service, gboolean success, g
 static void
 verify_create_history_entry (EphyHistoryService *service, gboolean success, gpointer result_data, gpointer 
user_data)
 {
-  g_assert (result_data == NULL);
+  g_assert_null (result_data);
   g_assert_cmpint (42, ==, GPOINTER_TO_INT (user_data));
-  g_assert (success);
+  g_assert_true (success);
   ephy_history_service_find_visits_in_time (service, 0, 8, NULL, verify_create_history_entry_cb, NULL);
 }
 
@@ -190,8 +189,8 @@ get_url (EphyHistoryService *service, gboolean success, gpointer result_data, gp
 {
   EphyHistoryURL *url = (EphyHistoryURL *)result_data;
 
-  g_assert (success == TRUE);
-  g_assert (url != NULL);
+  g_assert_true (success);
+  g_assert_nonnull (url);
   g_assert_cmpstr (url->title, ==, "GNOME");
 
   ephy_history_url_free (url);
@@ -203,7 +202,7 @@ static void
 set_url_title (EphyHistoryService *service, gboolean success, gpointer result_data, gpointer user_data)
 {
   gboolean test_result = GPOINTER_TO_INT (user_data);
-  g_assert (success == TRUE);
+  g_assert_true (success);
 
   if (test_result == FALSE) {
     g_object_unref (service);
@@ -247,7 +246,7 @@ test_set_url_title_is_correct (void)
 static void
 set_url_title_url_not_existent (EphyHistoryService *service, gboolean success, gpointer result_data, 
gpointer user_data)
 {
-  g_assert (success == FALSE);
+  g_assert_false (success);
   g_object_unref (service);
   gtk_main_quit ();
 }
@@ -272,15 +271,15 @@ test_get_url_done (EphyHistoryService *service, gboolean success, gpointer resul
 
   url = (EphyHistoryURL *)result_data;
 
-  g_assert (success == expected_success);
+  g_assert_true (success == expected_success);
 
   if (expected_success == TRUE) {
-    g_assert (url != NULL);
+    g_assert_nonnull (url);
     g_assert_cmpstr (url->url, ==, "http://www.gnome.org";);
     g_assert_cmpint (url->id, !=, -1);
     ephy_history_url_free (url);
   } else
-    g_assert (url == NULL);
+    g_assert_null (url);
 
   g_object_unref (service);
   gtk_main_quit ();
@@ -289,7 +288,7 @@ test_get_url_done (EphyHistoryService *service, gboolean success, gpointer resul
 static void
 test_get_url_visit_added (EphyHistoryService *service, gboolean success, gpointer result_data, gpointer 
user_data)
 {
-  g_assert (success == TRUE);
+  g_assert_true (success);
 
   ephy_history_service_get_url (service, "http://www.gnome.org";, NULL, test_get_url_done, user_data);
 }
@@ -375,7 +374,7 @@ perform_complex_url_query (EphyHistoryService *service,
   EphyHistoryQuery *query;
   EphyHistoryURL *url;
 
-  g_assert (success == TRUE);
+  g_assert_true (success);
 
   /* Get the most visited site that contains 'k'. */
   query = ephy_history_query_new ();
@@ -415,7 +414,7 @@ perform_complex_url_query_with_time_range (EphyHistoryService *service,
   EphyHistoryQuery *query;
   EphyHistoryURL *url;
 
-  g_assert (success == TRUE);
+  g_assert_true (success);
 
   /* Get the most visited site that contains 'k' that was visited since timestamp 500. */
   query = ephy_history_query_new ();
@@ -471,7 +470,7 @@ perform_query_after_clear (EphyHistoryService *service,
 {
   EphyHistoryQuery *query;
 
-  g_assert (success == TRUE);
+  g_assert_true (success);
 
   /* Get 10 random sites, the query should fail. */
   query = ephy_history_query_new ();
diff --git a/tests/ephy-location-entry-test.c b/tests/ephy-location-entry-test.c
index 8013e2a49..df0771cdd 100644
--- a/tests/ephy-location-entry-test.c
+++ b/tests/ephy-location-entry-test.c
@@ -31,8 +31,8 @@ test_entry_new (void)
   GtkWidget *entry;
   entry = ephy_location_entry_new ();
 
-  g_assert (GTK_IS_WIDGET (entry));
-  g_assert (EPHY_IS_LOCATION_ENTRY (entry));
+  g_assert_true (GTK_IS_WIDGET (entry));
+  g_assert_true (EPHY_IS_LOCATION_ENTRY (entry));
 }
 
 static void
@@ -44,7 +44,7 @@ test_entry_get_entry (void)
   lentry = EPHY_LOCATION_ENTRY (ephy_location_entry_new ());
   entry = ephy_location_entry_get_entry (lentry);
 
-  g_assert (GTK_IS_ENTRY (entry));
+  g_assert_true (GTK_IS_ENTRY (entry));
 }
 
 static void
diff --git a/tests/ephy-session-test.c b/tests/ephy-session-test.c
index 00822f60e..a71037777 100644
--- a/tests/ephy-session-test.c
+++ b/tests/ephy-session-test.c
@@ -100,23 +100,23 @@ test_ephy_session_load (void)
   disable_delayed_loading ();
 
   session = ephy_shell_get_session (ephy_shell_get_default ());
-  g_assert (session);
+  g_assert_nonnull (session);
 
   loop = ephy_test_utils_setup_ensure_web_views_are_loaded ();
 
   ret = load_session_from_string (session, session_data);
-  g_assert (ret);
+  g_assert_true (ret);
 
   ephy_test_utils_ensure_web_views_are_loaded (loop);
 
   l = gtk_application_get_windows (GTK_APPLICATION (ephy_shell_get_default ()));
-  g_assert (l);
+  g_assert_nonnull (l);
   g_assert_cmpint (g_list_length (l), ==, 1);
 
   embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (l->data));
-  g_assert (embed);
+  g_assert_nonnull (embed);
   view = ephy_embed_get_web_view (embed);
-  g_assert (view);
+  g_assert_nonnull (view);
   ephy_test_utils_check_ephy_web_view_address (view, "ephy-about:memory");
 
   ephy_session_clear (session);
@@ -157,8 +157,8 @@ test_ephy_session_clear (void)
 
   ephy_session_clear (session);
 
-  g_assert (gtk_application_get_windows (GTK_APPLICATION (ephy_shell_get_default ())) == NULL);
-  g_assert (ephy_session_get_can_undo_tab_closed (session) == FALSE);
+  g_assert_null (gtk_application_get_windows (GTK_APPLICATION (ephy_shell_get_default ())));
+  g_assert_false (ephy_session_get_can_undo_tab_closed (session));
 }
 
 const char *session_data_empty =
@@ -178,12 +178,12 @@ test_ephy_session_load_empty_session (void)
   disable_delayed_loading ();
 
   session = ephy_shell_get_session (ephy_shell_get_default ());
-  g_assert (session);
+  g_assert_nonnull (session);
 
   loop = ephy_test_utils_setup_ensure_web_views_are_loaded ();
 
   ret = load_session_from_string (session, session_data_empty);
-  g_assert (ret == FALSE);
+  g_assert_false (ret);
 
   /* Loading the session should have failed, but we should still get
    * the default empty window. Got to spin the mainloop though,
@@ -192,13 +192,13 @@ test_ephy_session_load_empty_session (void)
   ephy_test_utils_ensure_web_views_are_loaded (loop);
 
   l = gtk_application_get_windows (GTK_APPLICATION (ephy_shell_get_default ()));
-  g_assert (l);
+  g_assert_nonnull (l);
   g_assert_cmpint (g_list_length (l), ==, 1);
 
   embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (l->data));
-  g_assert (embed);
+  g_assert_nonnull (embed);
   view = ephy_embed_get_web_view (embed);
-  g_assert (view);
+  g_assert_nonnull (view);
   ephy_test_utils_check_ephy_web_view_address (view, "ephy-about:overview");
 
   enable_delayed_loading ();
@@ -219,26 +219,26 @@ test_ephy_session_load_many_windows (void)
   disable_delayed_loading ();
 
   session = ephy_shell_get_session (ephy_shell_get_default ());
-  g_assert (session);
+  g_assert_nonnull (session);
 
   loop = ephy_test_utils_setup_ensure_web_views_are_loaded ();
 
   ret = load_session_from_string (session, session_data_many_windows);
-  g_assert (ret);
+  g_assert_true (ret);
   g_assert_cmpint (ephy_test_utils_get_web_view_ready_counter (), >=, 0);
   g_assert_cmpint (ephy_test_utils_get_web_view_ready_counter (), <=, 2);
 
   ephy_test_utils_ensure_web_views_are_loaded (loop);
 
   l = gtk_application_get_windows (GTK_APPLICATION (ephy_shell_get_default ()));
-  g_assert (l);
+  g_assert_nonnull (l);
   g_assert_cmpint (g_list_length (l), ==, 2);
 
   for (p = l; p; p = p->next) {
     embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (p->data));
-    g_assert (embed);
+    g_assert_nonnull (embed);
     view = ephy_embed_get_web_view (embed);
-    g_assert (view);
+    g_assert_nonnull (view);
   }
 
   enable_delayed_loading ();
@@ -259,14 +259,14 @@ open_uris_after_loading_session (const char **uris, int final_num_windows)
   disable_delayed_loading ();
 
   session = ephy_shell_get_session (ephy_shell_get_default ());
-  g_assert (session);
+  g_assert_nonnull (session);
 
   loop = ephy_test_utils_setup_ensure_web_views_are_loaded ();
 
   user_time = gdk_x11_display_get_user_time (gdk_display_get_default ());
 
   ret = load_session_from_string (session, session_data_many_windows);
-  g_assert (ret);
+  g_assert_true (ret);
   g_assert_cmpint (ephy_test_utils_get_web_view_ready_counter (), >=, 0);
   g_assert_cmpint (ephy_test_utils_get_web_view_ready_counter (), <=, 2);
 
@@ -274,14 +274,14 @@ open_uris_after_loading_session (const char **uris, int final_num_windows)
 
   l = gtk_application_get_windows (GTK_APPLICATION (ephy_shell_get_default ()));
 
-  g_assert (l);
+  g_assert_nonnull (l);
   g_assert_cmpint (g_list_length (l), ==, 2);
 
   for (p = l; p; p = p->next) {
     embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (p->data));
-    g_assert (embed);
+    g_assert_nonnull (embed);
     view = ephy_embed_get_web_view (embed);
-    g_assert (view);
+    g_assert_nonnull (view);
   }
 
   /* Causing a session load here should not create new windows, since we
@@ -296,7 +296,7 @@ open_uris_after_loading_session (const char **uris, int final_num_windows)
     gtk_main_iteration_do (FALSE);
 
   l = gtk_application_get_windows (GTK_APPLICATION (ephy_shell_get_default ()));
-  g_assert (l);
+  g_assert_nonnull (l);
   g_assert_cmpint (g_list_length (l), ==, 2);
 
   /* We should still have only 2 windows after the session load
@@ -312,7 +312,7 @@ open_uris_after_loading_session (const char **uris, int final_num_windows)
    * in a new tab of an existing window.
    */
   l = gtk_application_get_windows (GTK_APPLICATION (ephy_shell_get_default ()));
-  g_assert (l);
+  g_assert_nonnull (l);
   g_assert_cmpint (g_list_length (l), ==, final_num_windows);
 
   enable_delayed_loading ();
@@ -354,7 +354,7 @@ main (int argc, char *argv[])
   }
 
   _ephy_shell_create_instance (EPHY_EMBED_SHELL_MODE_TEST);
-  g_assert (ephy_shell_get_default ());
+  g_assert_nonnull (ephy_shell_get_default ());
 
   g_application_register (G_APPLICATION (ephy_shell_get_default ()), NULL, NULL);
 
diff --git a/tests/ephy-shell-test.c b/tests/ephy-shell-test.c
index b6bac99a9..fdd18fc0a 100644
--- a/tests/ephy-shell-test.c
+++ b/tests/ephy-shell-test.c
@@ -46,7 +46,7 @@ test_ephy_shell_basic_embeds (void)
   ephy_shell = ephy_shell_get_default ();
 
   window = ephy_window_new ();
-  g_assert (EPHY_IS_WINDOW (window));
+  g_assert_true (EPHY_IS_WINDOW (window));
 
   /* Embed should be created. */
   embed1 = ephy_shell_new_tab_full
@@ -57,9 +57,9 @@ test_ephy_shell_basic_embeds (void)
              NULL,       /* embed */
              EPHY_NEW_TAB_DONT_SHOW_WINDOW,       /* flags */
              gtk_get_current_event_time ());
-  g_assert (EPHY_IS_EMBED (embed1));
+  g_assert_true (EPHY_IS_EMBED (embed1));
 
-  g_assert (gtk_widget_get_toplevel (GTK_WIDGET (embed1)) == GTK_WIDGET (window));
+  g_assert_true (gtk_widget_get_toplevel (GTK_WIDGET (embed1)) == GTK_WIDGET (window));
 
   children = ephy_embed_container_get_children (EPHY_EMBED_CONTAINER (window));
   g_assert_cmpint (g_list_length (children), ==, 1);
@@ -74,7 +74,7 @@ test_ephy_shell_basic_embeds (void)
              NULL,       /* embed */
              EPHY_NEW_TAB_DONT_SHOW_WINDOW,       /* flags */
              gtk_get_current_event_time ());
-  g_assert (EPHY_IS_EMBED (embed2));
+  g_assert_true (EPHY_IS_EMBED (embed2));
 
   /* A second children should exist now. */
   children = ephy_embed_container_get_children (EPHY_EMBED_CONTAINER (window));
@@ -100,8 +100,8 @@ test_ephy_shell_parent_windows (void)
             (ephy_shell, EPHY_WINDOW (window), NULL,
             EPHY_NEW_TAB_DONT_SHOW_WINDOW);
 
-  g_assert (EPHY_IS_EMBED (embed));
-  g_assert (gtk_widget_get_toplevel (GTK_WIDGET (embed)) == window);
+  g_assert_true (EPHY_IS_EMBED (embed));
+  g_assert_true (gtk_widget_get_toplevel (GTK_WIDGET (embed)) == window);
   g_object_ref_sink (embed);
   g_object_unref (embed);
 
@@ -112,9 +112,9 @@ test_ephy_shell_parent_windows (void)
             EPHY_NEW_TAB_DONT_SHOW_WINDOW);
 
   /* The parent window should be a completely new one. */
-  g_assert (EPHY_IS_EMBED (embed));
-  g_assert (gtk_widget_get_toplevel (GTK_WIDGET (embed)) != window);
-  g_assert (gtk_widget_get_toplevel (GTK_WIDGET (embed)) == window2);
+  g_assert_true (EPHY_IS_EMBED (embed));
+  g_assert_true (gtk_widget_get_toplevel (GTK_WIDGET (embed)) != window);
+  g_assert_true (gtk_widget_get_toplevel (GTK_WIDGET (embed)) == window2);
 
   gtk_widget_destroy (window);
   gtk_widget_destroy (window2);
@@ -140,7 +140,7 @@ test_ephy_shell_tab_load (void)
             EPHY_NEW_TAB_DONT_SHOW_WINDOW);
   ephy_web_view_load_homepage (ephy_embed_get_web_view (embed));
 
-  g_assert (EPHY_IS_EMBED (embed));
+  g_assert_true (EPHY_IS_EMBED (embed));
 
   ephy_test_utils_ensure_web_views_are_loaded (loop);
 
@@ -159,7 +159,7 @@ test_ephy_shell_tab_load (void)
             EPHY_NEW_TAB_DONT_SHOW_WINDOW);
   ephy_web_view_load_url (ephy_embed_get_web_view (embed), "about:epiphany");
 
-  g_assert (EPHY_IS_EMBED (embed));
+  g_assert_true (EPHY_IS_EMBED (embed));
 
   ephy_test_utils_ensure_web_views_are_loaded (loop);
 
@@ -251,7 +251,7 @@ test_ephy_shell_tab_from_external (void)
   /* This embed should be used in load-from-external. */
   embed2 = ephy_shell_new_tab (ephy_shell, EPHY_WINDOW (window), NULL, NULL,
                                EPHY_NEW_TAB_DONT_SHOW_WINDOW | EPHY_NEW_TAB_IN_EXISTING_WINDOW);
-  g_assert (gtk_widget_get_toplevel (GTK_WIDGET (embed2)) == window);
+  g_assert_true (gtk_widget_get_toplevel (GTK_WIDGET (embed2)) == window);
 
   /* ephy_shell_new_tab_full uses ephy_web_view_is_loading() to know if
    * it can reuse an embed for EPHY_NEW_TAB_FROM_EXTERNAL. EphyWebView
@@ -261,7 +261,7 @@ test_ephy_shell_tab_from_external (void)
 
   embed3 = ephy_shell_new_tab (ephy_shell, EPHY_WINDOW (window), NULL, "about:memory",
                                EPHY_NEW_TAB_DONT_SHOW_WINDOW | EPHY_NEW_TAB_OPEN_PAGE | 
EPHY_NEW_TAB_IN_EXISTING_WINDOW);
-  g_assert (gtk_widget_get_toplevel (GTK_WIDGET (embed3)) == window);
+  g_assert_true (gtk_widget_get_toplevel (GTK_WIDGET (embed3)) == window);
 
   ephy_test_utils_ensure_web_views_are_loaded (loop);
 
@@ -273,7 +273,7 @@ test_ephy_shell_tab_from_external (void)
 
   embed4 = ephy_shell_new_tab (ephy_shell, EPHY_WINDOW (window), NULL, "about:applications",
                                EPHY_NEW_TAB_DONT_SHOW_WINDOW | EPHY_NEW_TAB_IN_EXISTING_WINDOW | 
EPHY_NEW_TAB_OPEN_PAGE | EPHY_NEW_TAB_FROM_EXTERNAL);
-  g_assert (embed4 != embed2);
+  g_assert_true (embed4 != embed2);
 
   ephy_test_utils_ensure_web_views_are_loaded (loop);
 
@@ -291,7 +291,7 @@ test_ephy_shell_tab_from_external (void)
   embed5 = ephy_shell_new_tab (ephy_shell, EPHY_WINDOW (window), NULL, "about:applications",
                                EPHY_NEW_TAB_DONT_SHOW_WINDOW | EPHY_NEW_TAB_IN_EXISTING_WINDOW | 
EPHY_NEW_TAB_OPEN_PAGE | EPHY_NEW_TAB_FROM_EXTERNAL);
 
-  g_assert (embed5 == embed2);
+  g_assert_true (embed5 == embed2);
 
   ephy_test_utils_wait_until_load_is_committed (loop);
 
diff --git a/tests/ephy-snapshot-service-test.c b/tests/ephy-snapshot-service-test.c
index 310c370b1..e550a3e8c 100644
--- a/tests/ephy-snapshot-service-test.c
+++ b/tests/ephy-snapshot-service-test.c
@@ -53,7 +53,7 @@ on_snapshot_ready (GObject      *source,
 
   pixbuf = ephy_snapshot_service_get_snapshot_finish (EPHY_SNAPSHOT_SERVICE (source),
                                                       res, NULL, &error);
-  g_assert (GDK_IS_PIXBUF (pixbuf) || error != NULL);
+  g_assert_true (GDK_IS_PIXBUF (pixbuf) || error != NULL);
 
   if (error) {
     g_warning ("Error loading pixbuf: %s", error->message);
diff --git a/tests/ephy-sqlite-test.c b/tests/ephy-sqlite-test.c
index 9576a5139..3691f5b00 100644
--- a/tests/ephy-sqlite-test.c
+++ b/tests/ephy-sqlite-test.c
@@ -34,22 +34,22 @@ test_create_connection (void)
 
   temporary_file = g_build_filename (g_get_tmp_dir (), "epiphany-sqlite-test.db", NULL);
   connection = ephy_sqlite_connection_new (EPHY_SQLITE_CONNECTION_MODE_READWRITE, temporary_file);
-  g_assert (ephy_sqlite_connection_open (connection, &error));
-  g_assert (!error);
-  g_assert (g_file_test (temporary_file, G_FILE_TEST_IS_REGULAR));
+  g_assert_true (ephy_sqlite_connection_open (connection, &error));
+  g_assert_no_error (error);
+  g_assert_true (g_file_test (temporary_file, G_FILE_TEST_IS_REGULAR));
 
   ephy_sqlite_connection_close (connection);
   ephy_sqlite_connection_delete_database (connection);
-  g_assert (!g_file_test (temporary_file, G_FILE_TEST_IS_REGULAR));
+  g_assert_false (g_file_test (temporary_file, G_FILE_TEST_IS_REGULAR));
 
   g_free (temporary_file);
   g_object_unref (connection);
 
   temporary_file = g_build_filename (g_get_tmp_dir (), "directory-that-does-not-exist", 
"epiphany_sqlite_test.db", NULL);
   connection = ephy_sqlite_connection_new (EPHY_SQLITE_CONNECTION_MODE_READWRITE, temporary_file);
-  g_assert (!ephy_sqlite_connection_open (connection, &error));
-  g_assert (error);
-  g_assert (!g_file_test (temporary_file, G_FILE_TEST_IS_REGULAR));
+  g_assert_false (ephy_sqlite_connection_open (connection, &error));
+  g_assert_nonnull (error);
+  g_assert_false (g_file_test (temporary_file, G_FILE_TEST_IS_REGULAR));
 
   g_free (temporary_file);
   g_object_unref (connection);
@@ -65,17 +65,17 @@ test_create_statement (void)
 
   temporary_file = g_build_filename (g_get_tmp_dir (), "epiphany-sqlite-test.db", NULL);
   connection = ephy_sqlite_connection_new (EPHY_SQLITE_CONNECTION_MODE_READWRITE, temporary_file);
-  g_assert (ephy_sqlite_connection_open (connection, &error));
-  g_assert (!error);
+  g_assert_true (ephy_sqlite_connection_open (connection, &error));
+  g_assert_no_error (error);
 
   statement = ephy_sqlite_connection_create_statement (connection, "CREATE TABLE TEST (id INTEGER)", &error);
-  g_assert (statement);
-  g_assert (!error);
+  g_assert_nonnull (statement);
+  g_assert_no_error (error);
   g_object_unref (statement);
 
   statement = ephy_sqlite_connection_create_statement (connection, "BLAHBLAHBLAHBA", &error);
-  g_assert (!statement);
-  g_assert (error);
+  g_assert_null (statement);
+  g_assert_nonnull (error);
 
   ephy_sqlite_connection_close (connection);
   ephy_sqlite_connection_delete_database (connection);
@@ -89,32 +89,32 @@ create_table_and_insert_row (EphySQLiteConnection *connection)
 {
   GError *error = NULL;
   EphySQLiteStatement *statement = ephy_sqlite_connection_create_statement (connection, "CREATE TABLE test 
(id INTEGER, text LONGVARCHAR)", &error);
-  g_assert (statement);
-  g_assert (!error);
+  g_assert_nonnull (statement);
+  g_assert_no_error (error);
   ephy_sqlite_statement_step (statement, &error);
-  g_assert (!error);
+  g_assert_no_error (error);
   g_object_unref (statement);
 
   statement = ephy_sqlite_connection_create_statement (connection, "SELECT * FROM test", &error);
-  g_assert (statement);
-  g_assert (!error);
-  g_assert (!ephy_sqlite_statement_step (statement, &error));
-  g_assert (!error);
+  g_assert_nonnull (statement);
+  g_assert_no_error (error);
+  g_assert_false (ephy_sqlite_statement_step (statement, &error));
+  g_assert_no_error (error);
   g_object_unref (statement);
 
   statement = ephy_sqlite_connection_create_statement (connection, "INSERT INTO test (id, text) VALUES (3, 
\"test\")", &error);
-  g_assert (statement);
-  g_assert (!error);
+  g_assert_nonnull (statement);
+  g_assert_no_error (error);
   ephy_sqlite_statement_step (statement, &error);
-  g_assert (!error);
+  g_assert_no_error (error);
   g_object_unref (statement);
 
   statement = ephy_sqlite_connection_create_statement (connection, "SELECT * FROM test", &error);
-  g_assert (statement);
-  g_assert (!error);
+  g_assert_nonnull (statement);
+  g_assert_no_error (error);
 
-  g_assert (ephy_sqlite_statement_step (statement, &error));
-  g_assert (!error);
+  g_assert_true (ephy_sqlite_statement_step (statement, &error));
+  g_assert_no_error (error);
 
   g_assert_cmpint (ephy_sqlite_connection_get_last_insert_id (connection), ==, 1);
   g_assert_cmpint (ephy_sqlite_statement_get_column_count (statement), ==, 2);
@@ -122,7 +122,7 @@ create_table_and_insert_row (EphySQLiteConnection *connection)
   g_assert_cmpint (ephy_sqlite_statement_get_column_type (statement, 1), ==, EPHY_SQLITE_COLUMN_TYPE_STRING);
 
   /* Step will return false here since there is only one row. */
-  g_assert (!ephy_sqlite_statement_step (statement, &error));
+  g_assert_false (ephy_sqlite_statement_step (statement, &error));
   g_object_unref (statement);
 }
 
@@ -135,8 +135,8 @@ test_create_table_and_insert_row (void)
 
   temporary_file = g_build_filename (g_get_tmp_dir (), "epiphany-sqlite-test.db", NULL);
   connection = ephy_sqlite_connection_new (EPHY_SQLITE_CONNECTION_MODE_READWRITE, temporary_file);
-  g_assert (ephy_sqlite_connection_open (connection, &error));
-  g_assert (!error);
+  g_assert_true (ephy_sqlite_connection_open (connection, &error));
+  g_assert_no_error (error);
 
   create_table_and_insert_row (connection);
 
@@ -157,8 +157,8 @@ test_bind_data (void)
 
   temporary_file = g_build_filename (g_get_tmp_dir (), "epiphany-sqlite-test.db", NULL);
   connection = ephy_sqlite_connection_new (EPHY_SQLITE_CONNECTION_MODE_READWRITE, temporary_file);
-  g_assert (ephy_sqlite_connection_open (connection, &error));
-  g_assert (!error);
+  g_assert_true (ephy_sqlite_connection_open (connection, &error));
+  g_assert_no_error (error);
 
   ephy_sqlite_connection_execute (connection, "CREATE TABLE test (id INTEGER, text LONGVARCHAR)", &error);
 
@@ -201,14 +201,14 @@ test_table_exists (void)
 
   temporary_file = g_build_filename (g_get_tmp_dir (), "epiphany-sqlite-test.db", NULL);
   connection = ephy_sqlite_connection_new (EPHY_SQLITE_CONNECTION_MODE_READWRITE, temporary_file);
-  g_assert (ephy_sqlite_connection_open (connection, &error));
-  g_assert (!error);
+  g_assert_true (ephy_sqlite_connection_open (connection, &error));
+  g_assert_no_error (error);
 
-  g_assert (!ephy_sqlite_connection_table_exists (connection, "test"));
-  g_assert (!ephy_sqlite_connection_table_exists (connection, "something_fakey"));
+  g_assert_false (ephy_sqlite_connection_table_exists (connection, "test"));
+  g_assert_false (ephy_sqlite_connection_table_exists (connection, "something_fakey"));
   create_table_and_insert_row (connection);
-  g_assert (ephy_sqlite_connection_table_exists (connection, "test"));
-  g_assert (!ephy_sqlite_connection_table_exists (connection, "something_fakey"));
+  g_assert_true (ephy_sqlite_connection_table_exists (connection, "test"));
+  g_assert_false (ephy_sqlite_connection_table_exists (connection, "something_fakey"));
 
   ephy_sqlite_connection_close (connection);
   ephy_sqlite_connection_delete_database (connection);
diff --git a/tests/ephy-web-app-utils-test.c b/tests/ephy-web-app-utils-test.c
index eea5a030a..da47b0ce0 100644
--- a/tests/ephy-web-app-utils-test.c
+++ b/tests/ephy-web-app-utils-test.c
@@ -69,17 +69,17 @@ test_web_app_lifetime (void)
     /* Test creation */
     id = ephy_web_application_get_app_id_from_name (test.name);
     desktop_file = ephy_web_application_create (id, test.url, test.name, NULL);
-    g_assert (g_str_has_prefix (desktop_file, ephy_dot_dir ()));
-    g_assert (g_file_test (desktop_file, G_FILE_TEST_EXISTS));
+    g_assert_true (g_str_has_prefix (desktop_file, ephy_dot_dir ()));
+    g_assert_true (g_file_test (desktop_file, G_FILE_TEST_EXISTS));
 
     /* Test the desktop file */
     key_file = g_key_file_new ();
-    g_assert (g_key_file_load_from_file (key_file, desktop_file, G_KEY_FILE_NONE, NULL));
+    g_assert_true (g_key_file_load_from_file (key_file, desktop_file, G_KEY_FILE_NONE, NULL));
     name = g_key_file_get_string (key_file, "Desktop Entry", "Name", NULL);
     g_assert_cmpstr (name, ==, test.name);
     g_free (name);
     exec = g_key_file_get_string (key_file, "Desktop Entry", "Exec", NULL);
-    g_assert (g_str_has_suffix (exec, test.url));
+    g_assert_true (g_str_has_suffix (exec, test.url));
     g_free (exec);
     g_assert_null (g_key_file_get_string (key_file, "Desktop Entry", "Icon", NULL));
     wm_class = g_key_file_get_string (key_file, "Desktop Entry", "StartupWMClass", NULL);
@@ -91,18 +91,18 @@ test_web_app_lifetime (void)
 
     /* test profile directory */
     profile_dir = ephy_web_application_get_profile_directory (id);
-    g_assert (g_str_has_prefix (desktop_file, profile_dir));
-    g_assert (g_str_has_prefix (profile_dir, ephy_dot_dir ()));
-    g_assert (g_file_test (profile_dir, G_FILE_TEST_EXISTS));
+    g_assert_true (g_str_has_prefix (desktop_file, profile_dir));
+    g_assert_true (g_str_has_prefix (profile_dir, ephy_dot_dir ()));
+    g_assert_true (g_file_test (profile_dir, G_FILE_TEST_EXISTS));
 
     /* Test proper symlink */
     basename = g_path_get_basename (desktop_file);
     desktop_link = g_build_filename (xdg_data_home, "applications", basename, NULL);
-    g_assert (g_file_test (desktop_link, G_FILE_TEST_EXISTS));
-    g_assert (g_file_test (desktop_link, G_FILE_TEST_IS_SYMLINK));
+    g_assert_true (g_file_test (desktop_link, G_FILE_TEST_EXISTS));
+    g_assert_true (g_file_test (desktop_link, G_FILE_TEST_IS_SYMLINK));
 
     /* Test exists API */
-    g_assert (ephy_web_application_exists (id));
+    g_assert_true (ephy_web_application_exists (id));
 
     /* Test list API */
     apps = ephy_web_application_get_application_list ();
@@ -119,12 +119,12 @@ test_web_app_lifetime (void)
 
     /* Test delete API */
     g_test_message ("DELETE: %s", test.name);
-    g_assert (ephy_web_application_delete (id));
+    g_assert_true (ephy_web_application_delete (id));
 
-    g_assert (g_file_test (desktop_link, G_FILE_TEST_EXISTS) == FALSE);
-    g_assert (g_file_test (desktop_link, G_FILE_TEST_IS_SYMLINK) == FALSE);
-    g_assert (g_file_test (profile_dir, G_FILE_TEST_EXISTS) == FALSE);
-    g_assert (ephy_web_application_exists (id) == FALSE);
+    g_assert_false (g_file_test (desktop_link, G_FILE_TEST_EXISTS));
+    g_assert_false (g_file_test (desktop_link, G_FILE_TEST_IS_SYMLINK));
+    g_assert_false (g_file_test (profile_dir, G_FILE_TEST_EXISTS));
+    g_assert_false (ephy_web_application_exists (id));
 
     apps = ephy_web_application_get_application_list ();
     g_assert_cmpint (g_list_length (apps), ==, 0);
diff --git a/tests/ephy-web-view-test.c b/tests/ephy-web-view-test.c
index 20f727975..d2cc89861 100644
--- a/tests/ephy-web-view-test.c
+++ b/tests/ephy-web-view-test.c
@@ -71,7 +71,7 @@ load_changed_cb (WebKitWebView *view, WebKitLoadEvent load_event, GMainLoop *loo
     return;
 
   expected_url = g_object_get_data (G_OBJECT (view), "test.expected_url");
-  g_assert (expected_url != NULL);
+  g_assert_nonnull (expected_url);
 
   loaded_url = webkit_web_view_get_uri (view);
   g_assert_cmpstr (loaded_url, ==, expected_url);
@@ -213,7 +213,7 @@ test_ephy_web_view_non_search_regex (void)
     g_test_message ("Regex failed: %s", error->message);
     g_error_free (error);
   }
-  g_assert (regex_non_search);
+  g_assert_nonnull (regex_non_search);
 
   regex_domain = g_regex_new (EPHY_WEB_VIEW_DOMAIN_REGEX,
                               0, G_REGEX_MATCH_NOTEMPTY, &error);
@@ -222,7 +222,7 @@ test_ephy_web_view_non_search_regex (void)
     g_test_message ("Regex failed: %s", error->message);
     g_error_free (error);
   }
-  g_assert (regex_domain);
+  g_assert_nonnull (regex_domain);
 
   for (i = 0; i < G_N_ELEMENTS (test_non_search_regex); i++) {
     RegexTest test;
@@ -233,8 +233,8 @@ test_ephy_web_view_non_search_regex (void)
                     test.match ? "NO SEARCH" : "SEARCH",
                     test.url);
 
-    g_assert (g_regex_match (regex_non_search, test.url, 0, NULL) == test.match ||
-              g_regex_match (regex_domain, test.url, 0, NULL) == test.match);
+    g_assert_true (g_regex_match (regex_non_search, test.url, 0, NULL) == test.match ||
+                   g_regex_match (regex_domain, test.url, 0, NULL) == test.match);
   }
 
   g_regex_unref (regex_non_search);
@@ -307,7 +307,7 @@ test_ephy_web_view_normalize_or_autosearch (void)
                                          "org.gnome.Epiphany.EphyWebViewTest",
                                          "http://duckduckgo.com/?q=%s&t=epiphany";,
                                          "");
-  g_assert (ephy_search_engine_manager_set_default_engine (manager, "org.gnome.Epiphany.EphyWebViewTest"));
+  g_assert_true (ephy_search_engine_manager_set_default_engine (manager, 
"org.gnome.Epiphany.EphyWebViewTest"));
   verify_normalize_or_autosearch_urls (view, normalize_or_autosearch_test_ddg, G_N_ELEMENTS 
(normalize_or_autosearch_test_ddg));
 
   ephy_search_engine_manager_modify_engine (manager,
@@ -315,7 +315,7 @@ test_ephy_web_view_normalize_or_autosearch (void)
                                             "http://www.google.com/?q=%s";,
                                             "");
 
-  g_assert (ephy_search_engine_manager_set_default_engine (manager, default_engine));
+  g_assert_true (ephy_search_engine_manager_set_default_engine (manager, default_engine));
   verify_normalize_or_autosearch_urls (view, normalize_or_autosearch_test_google, G_N_ELEMENTS 
(normalize_or_autosearch_test_google));
 
   ephy_search_engine_manager_delete_engine (manager, "org.gnome.Epiphany.EphyWebViewTest");
@@ -395,8 +395,7 @@ test_ephy_web_view_provisional_load_failure_updates_back_forward_list (void)
 
   ensure_back_forward_list_changes (loop);
 
-  g_assert (webkit_back_forward_list_get_current_item (
-              webkit_web_view_get_back_forward_list (WEBKIT_WEB_VIEW (view))));
+  g_assert_nonnull (webkit_back_forward_list_get_current_item (webkit_web_view_get_back_forward_list 
(WEBKIT_WEB_VIEW (view))));
 
   g_assert_cmpstr (bad_url, ==, webkit_back_forward_list_item_get_uri (
                      webkit_back_forward_list_get_current_item (
@@ -429,7 +428,7 @@ test_ephy_web_view_error_pages_not_stored_in_history (void)
   bad_url = "http://localhost:2984375932/";;
 
   history_service = ephy_embed_shell_get_global_history_service (embed_shell);
-  g_assert (history_service);
+  g_assert_nonnull (history_service);
   g_signal_connect (history_service, "visit-url",
                     G_CALLBACK (visit_url_cb), NULL);
 



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