[tracker-miners/sam/test-fix-asserts] tests: Use g_assert_true() instead of g_assert()




commit 3ad97ca51685b8c6b731979058d7ac9365e77818
Author: Sam Thursfield <sam afuera me uk>
Date:   Wed Aug 12 23:08:33 2020 +0200

    tests: Use g_assert_true() instead of g_assert()
    
    This fixes the tests when -DG_DISABLE_ASSERT is passed at compile time.
    
    See https://gitlab.gnome.org/GNOME/tracker/-/issues/240

 tests/libtracker-extract/tracker-encoding-test.c   |   4 +-
 tests/libtracker-extract/tracker-exif-test.c       |   6 +-
 .../libtracker-extract/tracker-extract-info-test.c |   2 +-
 tests/libtracker-extract/tracker-iptc-test.c       |   4 +-
 .../tracker-module-manager-test.c                  |   2 +-
 tests/libtracker-extract/tracker-utils-test.c      |  22 ++---
 tests/libtracker-extract/tracker-xmp-test.c        |  12 +--
 tests/libtracker-miner/miners-mock.c               |  10 +-
 .../tracker-file-enumerator-test.c                 |   2 +-
 tests/libtracker-miner/tracker-file-system-test.c  |  42 ++++-----
 .../libtracker-miner/tracker-indexing-tree-test.c  |   4 +-
 tests/libtracker-miner/tracker-miner-fs-test.c     |   4 +-
 tests/libtracker-miner/tracker-monitor-test.c      | 104 ++++++++++-----------
 .../libtracker-miner/tracker-priority-queue-test.c |  12 +--
 tests/libtracker-miner/tracker-task-pool-test.c    |  14 +--
 .../tracker-date-time-test.c                       |  20 ++--
 .../tracker-file-utils-test.c                      |  54 +++++------
 .../libtracker-miners-common/tracker-sched-test.c  |   4 +-
 .../tracker-type-utils-test.c                      |  46 ++++-----
 .../libtracker-miners-common/tracker-utils-test.c  |  22 ++---
 20 files changed, 195 insertions(+), 195 deletions(-)
---
diff --git a/tests/libtracker-extract/tracker-encoding-test.c 
b/tests/libtracker-extract/tracker-encoding-test.c
index a1859815d..a83fcb3c8 100644
--- a/tests/libtracker-extract/tracker-encoding-test.c
+++ b/tests/libtracker-extract/tracker-encoding-test.c
@@ -55,9 +55,9 @@ test_encoding_can_guess (void)
 {
         /* This just duplicates the function code... */
 #if defined (HAVE_ENCA) || defined (HAVE_LIBICU_CHARSET_DETECTION)
-        g_assert (tracker_encoding_can_guess ());
+        g_assert_true (tracker_encoding_can_guess ());
 #else
-        g_assert (!tracker_encoding_can_guess ());
+        g_assert_true (!tracker_encoding_can_guess ());
 #endif
 }
 
diff --git a/tests/libtracker-extract/tracker-exif-test.c b/tests/libtracker-extract/tracker-exif-test.c
index 490c4671d..37b80334a 100644
--- a/tests/libtracker-extract/tracker-exif-test.c
+++ b/tests/libtracker-extract/tracker-exif-test.c
@@ -29,7 +29,7 @@ test_exif_parse (void)
         gsize  length;
 
 
-        g_assert (g_file_get_contents (TOP_SRCDIR "/tests/libtracker-extract/exif-img.jpg", &blob, &length, 
NULL));
+        g_assert_true (g_file_get_contents (TOP_SRCDIR "/tests/libtracker-extract/exif-img.jpg", &blob, 
&length, NULL));
 
         exif = tracker_exif_new ((guchar *)blob, length, "test://file");
 
@@ -40,7 +40,7 @@ test_exif_parse (void)
 
         g_assert_cmpstr (exif->document_name, ==, "test-documentname");
         //g_assert_cmpstr (exif->time, ==, "test-documentname");
-        g_assert (exif->time_original);
+        g_assert_true (exif->time_original);
         g_assert_cmpstr (exif->artist, ==, "EXIFspec"); // -Exif:Artist
         g_assert_cmpstr (exif->user_comment, ==, "libexif demonstration image");
         g_assert_cmpstr (exif->description, ==, "Justfortest"); //-Exif:ImageDescription
@@ -76,7 +76,7 @@ test_exif_parse_empty (void)
         gchar *blob;
         gsize  length;
 
-        g_assert (g_file_get_contents (TOP_SRCDIR "/tests/libtracker-extract/exif-free-img.jpg", &blob, 
&length, NULL));
+        g_assert_true (g_file_get_contents (TOP_SRCDIR "/tests/libtracker-extract/exif-free-img.jpg", &blob, 
&length, NULL));
 
         exif = tracker_exif_new ((guchar *)blob, length, "test://file");
 
diff --git a/tests/libtracker-extract/tracker-extract-info-test.c 
b/tests/libtracker-extract/tracker-extract-info-test.c
index 33871a856..736350dc1 100644
--- a/tests/libtracker-extract/tracker-extract-info-test.c
+++ b/tests/libtracker-extract/tracker-extract-info-test.c
@@ -32,7 +32,7 @@ test_extract_info_setters (void)
         info = tracker_extract_info_new (file, "imaginary/mime", NULL);
         info_ref = tracker_extract_info_ref (info);
 
-        g_assert (g_file_equal (file, tracker_extract_info_get_file (info)));
+        g_assert_true (g_file_equal (file, tracker_extract_info_get_file (info)));
 
         g_assert_cmpstr (tracker_extract_info_get_mimetype (info), ==, "imaginary/mime");
 
diff --git a/tests/libtracker-extract/tracker-iptc-test.c b/tests/libtracker-extract/tracker-iptc-test.c
index eaa33d123..667d5b004 100644
--- a/tests/libtracker-extract/tracker-iptc-test.c
+++ b/tests/libtracker-extract/tracker-iptc-test.c
@@ -134,10 +134,10 @@ test_iptc_extraction (void)
         TrackerIptcData *data;
 
         data = load_iptc_blob (TOP_SRCDIR "/tests/libtracker-extract/iptc-img.jpg");
-        g_assert (data);
+        g_assert_true (data);
 
         g_assert_cmpstr (data->keywords, ==, "Coverage, test");
-        g_assert (g_str_has_prefix (data->date_created, "2011-10-22"));
+        g_assert_true (g_str_has_prefix (data->date_created, "2011-10-22"));
         g_assert_cmpstr (data->byline, ==, "BylineValue");
         g_assert_cmpstr (data->byline_title, ==, "BylineTitleValue");
         g_assert_cmpstr (data->credit, ==, "CreditValue");
diff --git a/tests/libtracker-extract/tracker-module-manager-test.c 
b/tests/libtracker-extract/tracker-module-manager-test.c
index f3f40907e..ad49fd04a 100644
--- a/tests/libtracker-extract/tracker-module-manager-test.c
+++ b/tests/libtracker-extract/tracker-module-manager-test.c
@@ -44,7 +44,7 @@ init_module_manager (void) {
        g_setenv ("TRACKER_EXTRACTOR_RULES_DIR", test_rules_dir, TRUE);
 
        success = tracker_extract_module_manager_init ();
-       g_assert (success);
+       g_assert_true (success);
 }
 
 static void
diff --git a/tests/libtracker-extract/tracker-utils-test.c b/tests/libtracker-extract/tracker-utils-test.c
index b821ba9ab..7edf5fbcd 100644
--- a/tests/libtracker-extract/tracker-utils-test.c
+++ b/tests/libtracker-extract/tracker-utils-test.c
@@ -52,7 +52,7 @@ test_guess_date (void)
        gchar *result;
 
        result = tracker_date_guess ("");
-       g_assert (result == NULL);
+       g_assert_true (result == NULL);
 
        result = tracker_date_guess ("2008-06-14");
        g_assert_cmpstr (result, ==, "2008-06-14T00:00:00");
@@ -79,10 +79,10 @@ test_guess_date (void)
         g_free (result);
 
         result = tracker_date_guess ("201a");
-        g_assert (!result);
+        g_assert_true (!result);
 
         result = tracker_date_guess ("A2010");
-        g_assert (!result);
+        g_assert_true (!result);
 
         /* Guessing from the code */
         result = tracker_date_guess ("20100318010203-00:03Z");
@@ -135,7 +135,7 @@ test_text_validate_utf8 ()
                                                     &utf8_len);
                g_assert_cmpuint (result, ==, 1);
                g_assert_cmpuint (utf8_len, ==, strlen (valid_utf8[i]));
-               g_assert (s);
+               g_assert_true (s);
                g_assert_cmpuint (s->len, ==, strlen (valid_utf8[i]));
                g_assert_cmpstr (s->str, ==, valid_utf8[i]);
                g_string_free (s, TRUE);
@@ -151,7 +151,7 @@ test_text_validate_utf8 ()
                                                     &utf8_len);
                g_assert_cmpuint (result, ==, 1);
                g_assert_cmpuint (utf8_len, ==, strlen (valid_utf8[i]));
-               g_assert (s);
+               g_assert_true (s);
                g_assert_cmpuint (s->len, ==, strlen (valid_utf8[i]));
                g_assert_cmpstr (s->str, ==, valid_utf8[i]);
                g_string_free (s, TRUE);
@@ -165,7 +165,7 @@ test_text_validate_utf8 ()
                                                     &s,
                                                     NULL);
                g_assert_cmpuint (result, ==, 1);
-               g_assert (s);
+               g_assert_true (s);
                g_assert_cmpuint (s->len, ==, strlen (valid_utf8[i]));
                g_assert_cmpstr (s->str, ==, valid_utf8[i]);
                g_string_free (s, TRUE);
@@ -198,7 +198,7 @@ test_text_validate_utf8 ()
                                             &utf8_len);
        g_assert_cmpuint (result, ==, 1);
        g_assert_cmpuint (utf8_len, ==, strlen ("abcdefghijk"));
-       g_assert (s);
+       g_assert_true (s);
        g_assert_cmpuint (s->len, ==, strlen ("abcdefghijk"));
        g_assert_cmpstr (s->str, ==, "abcdefghijk");
        g_string_free (s, TRUE);
@@ -211,20 +211,20 @@ test_date_to_iso8601 ()
         gchar *result;
 
         result = tracker_date_format_to_iso8601 ("2010:03:13 12:12:12", "%Y:%m:%d %H:%M:%S");
-        g_assert (g_str_has_prefix (result, "2010-03-13T12:12:12"));
+        g_assert_true (g_str_has_prefix (result, "2010-03-13T12:12:12"));
         g_assert_cmpint (strlen (result), <=, 25);
         g_free (result);
 
         /* Pattern and string don't match */
         result = tracker_date_format_to_iso8601 ("2010:03:13 12:12", "%Y:%m:%d %H:%M:%S");
-        g_assert (result == NULL);
+        g_assert_true (result == NULL);
 }
 
 static void
 test_coalesce_strip ()
 {
         /* Used in other tests, but this one can try some corner cases */
-        g_assert (!tracker_coalesce_strip (0, NULL));
+        g_assert_true (!tracker_coalesce_strip (0, NULL));
 
         /* Allocate, do not use constant strings */
         char *e = g_strdup ("");
@@ -256,7 +256,7 @@ test_merge_const ()
         g_free (result);
 
         result = tracker_merge_const ("*", 0, NULL);
-        g_assert (!result);
+        g_assert_true (!result);
 }
 
 static void
diff --git a/tests/libtracker-extract/tracker-xmp-test.c b/tests/libtracker-extract/tracker-xmp-test.c
index e396c90e1..055e2747a 100644
--- a/tests/libtracker-extract/tracker-xmp-test.c
+++ b/tests/libtracker-extract/tracker-xmp-test.c
@@ -185,7 +185,7 @@ test_parsing_xmp_invalid_file_subprocess (void)
        TrackerXmpData *data;
 
        data = tracker_xmp_new (BROKEN_XMP, strlen (BROKEN_XMP), "test://file");
-       g_assert (data != NULL);
+       g_assert_true (data != NULL);
 
        tracker_xmp_free (data);
 }
@@ -291,9 +291,9 @@ test_xmp_apply (void)
        resource = tracker_resource_new ("urn:uuid:test");
 
        data = tracker_xmp_new (EXAMPLE_XMP, strlen (EXAMPLE_XMP), "urn:uuid:test");
-       g_assert (data != NULL);
+       g_assert_true (data != NULL);
 
-       g_assert (tracker_xmp_apply_to_resource (resource, data));
+       g_assert_true (tracker_xmp_apply_to_resource (resource, data));
 
        /* We just check a few of the properties at random. */
        g_assert_cmpstr (tracker_resource_get_first_string (resource, "nie:description"), ==,
@@ -319,7 +319,7 @@ test_xmp_apply_location (void)
 
        resource = tracker_resource_new ("urn:uuid:test");
 
-       g_assert (tracker_xmp_apply_to_resource (resource, &data));
+       g_assert_true (tracker_xmp_apply_to_resource (resource, &data));
 
        location = tracker_resource_get_first_relation (resource, "slo:location");
        address = tracker_resource_get_first_relation (location, "slo:postalAddress");
@@ -349,7 +349,7 @@ test_xmp_regions (void)
 
        filepath = g_build_filename (TOP_SRCDIR, "tests", "libtracker-extract", "areas.xmp", NULL);
        f = g_file_new_for_path (filepath);
-       g_assert (g_file_load_contents (f, NULL, &contents, &size, NULL, NULL));
+       g_assert_true (g_file_load_contents (f, NULL, &contents, &size, NULL, NULL));
        g_object_unref (f);
        g_free (filepath);
 
@@ -392,7 +392,7 @@ test_xmp_regions_quill (void)
 
        filepath = g_build_filename (TOP_SRCDIR, "tests", "libtracker-extract", "areas-with-contacts.xmp", 
NULL);
        f = g_file_new_for_path (filepath);
-       g_assert (g_file_load_contents (f, NULL, &contents, &size, NULL, NULL));
+       g_assert_true (g_file_load_contents (f, NULL, &contents, &size, NULL, NULL));
        g_object_unref (f);
        g_free (filepath);
 
diff --git a/tests/libtracker-miner/miners-mock.c b/tests/libtracker-miner/miners-mock.c
index fe46b398a..a24652a37 100644
--- a/tests/libtracker-miner/miners-mock.c
+++ b/tests/libtracker-miner/miners-mock.c
@@ -123,7 +123,7 @@ dbus_g_proxy_call (DBusGProxy *proxy,
 
                arg_type = va_arg (args, GType);
 
-               g_assert (arg_type == G_TYPE_STRV);
+               g_assert_true (arg_type == G_TYPE_STRV);
                g_value_init (&value, arg_type);
                g_value_set_boxed (&value, running_services);
                G_VALUE_LCOPY (&value,
@@ -155,10 +155,10 @@ dbus_g_proxy_call (DBusGProxy *proxy,
                g_value_unset (&value);
 
                arg_type = va_arg (args, GType);
-               g_assert (arg_type == G_TYPE_INVALID);
+               g_assert_true (arg_type == G_TYPE_INVALID);
 
                arg_type = va_arg (args, GType);
-               g_assert (arg_type == G_TYPE_BOOLEAN);
+               g_assert_true (arg_type == G_TYPE_BOOLEAN);
                g_value_init (&value, arg_type);
                g_value_set_boolean (&value, active);
                G_VALUE_LCOPY (&value,
@@ -181,7 +181,7 @@ dbus_g_proxy_call (DBusGProxy *proxy,
                TrackerMinerMock *miner = (TrackerMinerMock *)proxy;
 
                arg_type = va_arg (args, GType);
-               g_assert (arg_type == G_TYPE_STRV);
+               g_assert_true (arg_type == G_TYPE_STRV);
                g_value_init (&value, arg_type);
                apps = tracker_miner_mock_get_apps (miner, &amount);
                if (apps == NULL || amount == 0) {
@@ -195,7 +195,7 @@ dbus_g_proxy_call (DBusGProxy *proxy,
                g_value_unset (&value);
 
                arg_type = va_arg (args, GType);
-               g_assert (arg_type == G_TYPE_STRV);
+               g_assert_true (arg_type == G_TYPE_STRV);
                g_value_init (&value, arg_type);
                reasons = tracker_miner_mock_get_reasons (miner, &amount);
                if (reasons == NULL || amount == 0) {
diff --git a/tests/libtracker-miner/tracker-file-enumerator-test.c 
b/tests/libtracker-miner/tracker-file-enumerator-test.c
index 67e3edaf1..9381d59ac 100644
--- a/tests/libtracker-miner/tracker-file-enumerator-test.c
+++ b/tests/libtracker-miner/tracker-file-enumerator-test.c
@@ -69,7 +69,7 @@ test_enumerator_and_provider (void)
        }
 
        g_assert_no_error (error);
-       g_assert (count > 0);
+       g_assert_true (count > 0);
 
        g_object_unref (enumerator);
        g_object_unref (data_provider);
diff --git a/tests/libtracker-miner/tracker-file-system-test.c 
b/tests/libtracker-miner/tracker-file-system-test.c
index c7919a7d1..5d0d317ea 100644
--- a/tests/libtracker-miner/tracker-file-system-test.c
+++ b/tests/libtracker-miner/tracker-file-system-test.c
@@ -61,22 +61,22 @@ test_file_system_insertions (TestCommonContext *fixture,
 
        file = g_file_new_for_uri ("file:///aaa/");
        canonical = tracker_file_system_peek_file (fixture->file_system, file);
-       g_assert (canonical == NULL);
+       g_assert_true (canonical == NULL);
 
        canonical = tracker_file_system_get_file (fixture->file_system, file,
                                                  G_FILE_TYPE_DIRECTORY, NULL);
        g_object_unref (file);
 
-       g_assert (canonical != NULL);
+       g_assert_true (canonical != NULL);
 
        file = g_file_new_for_uri ("file:///aaa/");
        other = tracker_file_system_get_file (fixture->file_system, file,
                                              G_FILE_TYPE_DIRECTORY, NULL);
-       g_assert (canonical == other);
+       g_assert_true (canonical == other);
 
        other = tracker_file_system_peek_file (fixture->file_system, file);
        g_object_unref (file);
-       g_assert (other != NULL);
+       g_assert_true (other != NULL);
 }
 
 static void
@@ -93,14 +93,14 @@ test_file_system_children (TestCommonContext *fixture,
        file = g_file_new_for_uri ("file:///aaa/bbb");
        child = tracker_file_system_get_file (fixture->file_system, file,
                                              G_FILE_TYPE_REGULAR, parent);
-       g_assert (child != NULL);
+       g_assert_true (child != NULL);
        g_object_unref (file);
 
        file = g_file_new_for_uri ("file:///aaa/bbb");
        other = tracker_file_system_get_file (fixture->file_system, file,
                                              G_FILE_TYPE_REGULAR, NULL);
-       g_assert (other != NULL);
-       g_assert (child == other);
+       g_assert_true (other != NULL);
+       g_assert_true (child == other);
 
        g_object_unref (file);
 }
@@ -119,14 +119,14 @@ test_file_system_indirect_children (TestCommonContext *fixture,
        file = g_file_new_for_uri ("file:///aaa/bbb/ccc");
        child = tracker_file_system_get_file (fixture->file_system, file,
                                              G_FILE_TYPE_REGULAR, parent);
-       g_assert (child != NULL);
+       g_assert_true (child != NULL);
        g_object_unref (file);
 
        file = g_file_new_for_uri ("file:///aaa/bbb/ccc");
        other = tracker_file_system_get_file (fixture->file_system, file,
                                              G_FILE_TYPE_REGULAR, NULL);
-       g_assert (other != NULL);
-       g_assert (child == other);
+       g_assert_true (other != NULL);
+       g_assert_true (child == other);
 
        /* FIXME: check missing parent in between */
 
@@ -147,19 +147,19 @@ test_file_system_reparenting (TestCommonContext *fixture,
        file = g_file_new_for_uri ("file:///aaa/bbb/ccc");
        grandchild = tracker_file_system_get_file (fixture->file_system, file,
                                                   G_FILE_TYPE_REGULAR, parent);
-       g_assert (grandchild != NULL);
+       g_assert_true (grandchild != NULL);
        g_object_unref (file);
 
        file = g_file_new_for_uri ("file:///aaa/bbb");
        child = tracker_file_system_get_file (fixture->file_system, file,
                                              G_FILE_TYPE_REGULAR, parent);
-       g_assert (child != NULL);
+       g_assert_true (child != NULL);
        g_object_unref (file);
 
        file = g_file_new_for_uri ("file:///aaa/bbb/ccc");
        other = tracker_file_system_peek_file (fixture->file_system, file);
-       g_assert (other != NULL);
-       g_assert (grandchild == other);
+       g_assert_true (other != NULL);
+       g_assert_true (grandchild == other);
        g_object_unref (file);
 
        /* Delete child in between */
@@ -168,14 +168,14 @@ test_file_system_reparenting (TestCommonContext *fixture,
        /* Check that child doesn't exist anymore */
        file = g_file_new_for_uri ("file:///aaa/bbb");
        child = tracker_file_system_peek_file (fixture->file_system, file);
-       g_assert (child == NULL);
+       g_assert_true (child == NULL);
        g_object_unref (file);
 
        /* Check that grand child still exists */
        file = g_file_new_for_uri ("file:///aaa/bbb/ccc");
        other = tracker_file_system_peek_file (fixture->file_system, file);
-       g_assert (other != NULL);
-       g_assert (grandchild == other);
+       g_assert_true (other != NULL);
+       g_assert_true (grandchild == other);
        g_object_unref (file);
 }
 
@@ -209,26 +209,26 @@ test_file_system_properties (TestCommonContext *fixture,
        /* Check second property and remove it */
        ret_value = tracker_file_system_get_property (fixture->file_system,
                                                      file, property2_quark);
-       g_assert (ret_value == value);
+       g_assert_true (ret_value == value);
 
        tracker_file_system_unset_property (fixture->file_system,
                                            file, property2_quark);
 
        ret_value = tracker_file_system_get_property (fixture->file_system,
                                                      file, property2_quark);
-       g_assert (ret_value == NULL);
+       g_assert_true (ret_value == NULL);
 
        /* Check first property and remove it */
        ret_value = tracker_file_system_get_property (fixture->file_system,
                                                      file, property1_quark);
-       g_assert (ret_value == value);
+       g_assert_true (ret_value == value);
 
        tracker_file_system_unset_property (fixture->file_system,
                                            file, property1_quark);
 
        ret_value = tracker_file_system_get_property (fixture->file_system,
                                                      file, property1_quark);
-       g_assert (ret_value == NULL);
+       g_assert_true (ret_value == NULL);
 }
 
 gint
diff --git a/tests/libtracker-miner/tracker-indexing-tree-test.c 
b/tests/libtracker-miner/tracker-indexing-tree-test.c
index 78b874c1d..b61179f1b 100644
--- a/tests/libtracker-miner/tracker-indexing-tree-test.c
+++ b/tests/libtracker-miner/tracker-indexing-tree-test.c
@@ -59,11 +59,11 @@ typedef struct {
 } TestCommonContext;
 
 #define ASSERT_INDEXABLE(fixture, id)    \
-       g_assert (tracker_indexing_tree_file_is_indexable (fixture->tree, \
+       g_assert_true (tracker_indexing_tree_file_is_indexable (fixture->tree, \
                                                           fixture->test_dir[id], \
                                                           G_FILE_TYPE_DIRECTORY) == TRUE)
 #define ASSERT_NOT_INDEXABLE(fixture, id)        \
-       g_assert (tracker_indexing_tree_file_is_indexable (fixture->tree, \
+       g_assert_true (tracker_indexing_tree_file_is_indexable (fixture->tree, \
                                                           fixture->test_dir[id], \
                                                           G_FILE_TYPE_DIRECTORY) == FALSE)
 
diff --git a/tests/libtracker-miner/tracker-miner-fs-test.c b/tests/libtracker-miner/tracker-miner-fs-test.c
index 78b71f9bb..111ec5726 100644
--- a/tests/libtracker-miner/tracker-miner-fs-test.c
+++ b/tests/libtracker-miner/tracker-miner-fs-test.c
@@ -1603,14 +1603,14 @@ test_event_queue_create_and_delete (TrackerMinerFSTestFixture *fixture,
 
        CREATE_UPDATE_FILE (fixture, "recursive/a");
        fixture_iterate_filter (fixture, 1);
-       g_assert (tracker_miner_fs_has_items_to_process (fixture->miner) == TRUE);
+       g_assert_true (tracker_miner_fs_has_items_to_process (fixture->miner) == TRUE);
 
        DELETE_FILE (fixture, "recursive/a");
        fixture_iterate_filter (fixture, 1);
 
        tracker_miner_resume (TRACKER_MINER (fixture->miner));
        fixture_iterate (fixture);
-       g_assert (tracker_miner_fs_has_items_to_process (fixture->miner) == FALSE);
+       g_assert_true (tracker_miner_fs_has_items_to_process (fixture->miner) == FALSE);
 }
 
 static void
diff --git a/tests/libtracker-miner/tracker-monitor-test.c b/tests/libtracker-miner/tracker-monitor-test.c
index b280e3b92..a52af9208 100644
--- a/tests/libtracker-miner/tracker-monitor-test.c
+++ b/tests/libtracker-miner/tracker-monitor-test.c
@@ -62,7 +62,7 @@ require_events (TrackerMonitorTestFixture *fixture,
 {
        gboolean created;
 
-       g_assert (G_IS_FILE (file));
+       g_assert_true (G_IS_FILE (file));
 
        created = g_hash_table_insert (fixture->require_events, g_object_ref (file), GUINT_TO_POINTER 
(event_mask));
 
@@ -78,7 +78,7 @@ prohibit_events (TrackerMonitorTestFixture *fixture,
 {
        gboolean created;
 
-       g_assert (G_IS_FILE (file));
+       g_assert_true (G_IS_FILE (file));
 
        created = g_hash_table_insert (fixture->prohibit_events, g_object_ref (file), GUINT_TO_POINTER 
(event_mask));
 
@@ -254,9 +254,9 @@ test_monitor_events_created_cb (TrackerMonitor *monitor,
        gchar *path;
        TrackerMonitorTestFixture *fixture = user_data;
 
-       g_assert (file != NULL);
+       g_assert_true (file != NULL);
        path = g_file_get_path (file);
-       g_assert (path != NULL);
+       g_assert_true (path != NULL);
 
        g_debug ("***** '%s' (%s) (CREATED)",
                 path,
@@ -279,9 +279,9 @@ test_monitor_events_updated_cb (TrackerMonitor *monitor,
        TrackerMonitorTestFixture *fixture = user_data;
        gchar *path;
 
-       g_assert (file != NULL);
+       g_assert_true (file != NULL);
        path = g_file_get_path (file);
-       g_assert (path != NULL);
+       g_assert_true (path != NULL);
 
        g_debug ("***** '%s' (%s) (UPDATED)",
                 path,
@@ -304,9 +304,9 @@ test_monitor_events_attribute_updated_cb (TrackerMonitor *monitor,
        TrackerMonitorTestFixture *fixture = user_data;
        gchar *path;
 
-       g_assert (file != NULL);
+       g_assert_true (file != NULL);
        path = g_file_get_path (file);
-       g_assert (path != NULL);
+       g_assert_true (path != NULL);
 
        g_debug ("***** '%s' (%s) (ATRIBUTE UPDATED)",
                 path,
@@ -329,9 +329,9 @@ test_monitor_events_deleted_cb (TrackerMonitor *monitor,
        TrackerMonitorTestFixture *fixture = user_data;
        gchar *path;
 
-       g_assert (file != NULL);
+       g_assert_true (file != NULL);
        path = g_file_get_path (file);
-       g_assert (path != NULL);
+       g_assert_true (path != NULL);
 
        g_debug ("***** '%s' (%s) (DELETED)",
                 path,
@@ -357,7 +357,7 @@ test_monitor_events_moved_cb (TrackerMonitor *monitor,
        gchar *path;
        gchar *other_path;
 
-       g_assert (file != NULL);
+       g_assert_true (file != NULL);
        path = g_file_get_path (other_file);
        other_path = g_file_get_path (other_file);
 
@@ -404,7 +404,7 @@ test_monitor_common_setup (TrackerMonitorTestFixture *fixture,
 
        /* Create and setup the tracker monitor */
        fixture->monitor = tracker_monitor_new ();
-       g_assert (fixture->monitor != NULL);
+       g_assert_true (fixture->monitor != NULL);
 
        g_signal_connect (fixture->monitor, "item-created",
                          G_CALLBACK (test_monitor_events_created_cb),
@@ -430,7 +430,7 @@ test_monitor_common_setup (TrackerMonitorTestFixture *fixture,
 
        fixture->monitored_directory = basename;
        fixture->monitored_directory_file = g_file_new_for_path (fixture->monitored_directory);
-       g_assert (fixture->monitored_directory_file != NULL);
+       g_assert_true (fixture->monitored_directory_file != NULL);
        g_assert_cmpint (tracker_monitor_add (fixture->monitor, fixture->monitored_directory_file), ==, TRUE);
        g_assert_cmpint (tracker_monitor_get_count (fixture->monitor), ==, 1);
 
@@ -439,7 +439,7 @@ test_monitor_common_setup (TrackerMonitorTestFixture *fixture,
 
        /* Create new main loop */
        fixture->main_loop = g_main_loop_new (NULL, FALSE);
-       g_assert (fixture->main_loop != NULL);
+       g_assert_true (fixture->main_loop != NULL);
 }
 
 static void
@@ -454,7 +454,7 @@ test_monitor_common_teardown (TrackerMonitorTestFixture *fixture,
        g_assert_cmpint (tracker_monitor_get_count (fixture->monitor), ==, 0);
 
        /* Destroy monitor */
-       g_assert (fixture->monitor != NULL);
+       g_assert_true (fixture->monitor != NULL);
        g_object_unref (fixture->monitor);
 
        /* Remove the hash_tables of events */
@@ -463,13 +463,13 @@ test_monitor_common_teardown (TrackerMonitorTestFixture *fixture,
        g_hash_table_destroy (fixture->prohibit_events);
 
        /* Remove base test directories */
-       g_assert (fixture->monitored_directory_file != NULL);
-       g_assert (fixture->monitored_directory != NULL);
+       g_assert_true (fixture->monitored_directory_file != NULL);
+       g_assert_true (fixture->monitored_directory != NULL);
        g_assert_cmpint (g_file_delete (fixture->monitored_directory_file, NULL, NULL), ==, TRUE);
        g_object_unref (fixture->monitored_directory_file);
        g_free (fixture->monitored_directory);
 
-       g_assert (fixture->not_monitored_directory != NULL);
+       g_assert_true (fixture->not_monitored_directory != NULL);
        g_free (fixture->not_monitored_directory);
 }
 
@@ -483,7 +483,7 @@ create_directory (const gchar  *parent,
 
        path = g_build_path (G_DIR_SEPARATOR_S, parent, directory_name, NULL);
        dirfile = g_file_new_for_path (path);
-       g_assert (dirfile != NULL);
+       g_assert_true (dirfile != NULL);
        g_assert_cmpint (g_file_make_directory_with_parents (dirfile, NULL, NULL), ==, TRUE);
        if (outfile) {
                *outfile = dirfile;
@@ -503,14 +503,14 @@ set_file_contents (const gchar  *directory,
        size_t length;
        gchar *file_path;
 
-       g_assert (directory != NULL);
-       g_assert (filename != NULL);
-       g_assert (contents != NULL);
+       g_assert_true (directory != NULL);
+       g_assert_true (filename != NULL);
+       g_assert_true (contents != NULL);
 
        file_path = g_build_filename (directory, filename, NULL);
 
        file = g_fopen (file_path, "wb");
-       g_assert (file != NULL);
+       g_assert_true (file != NULL);
        length = strlen (contents);
        g_assert_cmpint (fwrite (contents, 1, length, file), >=, length);
        g_assert_cmpint (fflush (file), ==, 0);
@@ -529,8 +529,8 @@ set_file_permissions (const gchar  *directory,
 {
        gchar *file_path;
 
-       g_assert (directory != NULL);
-       g_assert (filename != NULL);
+       g_assert_true (directory != NULL);
+       g_assert_true (filename != NULL);
 
        file_path = g_build_filename (directory, filename, NULL);
        g_assert_cmpint (g_chmod (file_path, permissions), ==, 0);
@@ -575,7 +575,7 @@ test_monitor_file_event_created (TrackerMonitorTestFixture *fixture,
 
        /* Create file to test with */
        set_file_contents (fixture->monitored_directory, "created.txt", "foo", &test_file);
-       g_assert (test_file != NULL);
+       g_assert_true (test_file != NULL);
        g_hash_table_insert (fixture->events,
                             g_object_ref (test_file),
                             GUINT_TO_POINTER (MONITOR_SIGNAL_NONE));
@@ -607,7 +607,7 @@ test_monitor_file_event_updated (TrackerMonitorTestFixture *fixture,
 
        /* Now, trigger update of the already created file */
        set_file_contents (fixture->monitored_directory, "created.txt", "barrrr", &test_file);
-       g_assert (test_file != NULL);
+       g_assert_true (test_file != NULL);
        g_hash_table_insert (fixture->events,
                             g_object_ref (test_file),
                             GUINT_TO_POINTER (MONITOR_SIGNAL_NONE));
@@ -633,7 +633,7 @@ test_monitor_file_event_attribute_updated (TrackerMonitorTestFixture *fixture,
 
        /* Create file to test with, before setting up environment */
        set_file_contents (fixture->monitored_directory, "created.txt", "foo", &test_file);
-       g_assert (test_file != NULL);
+       g_assert_true (test_file != NULL);
 
        /* Set up environment */
        tracker_monitor_set_enabled (fixture->monitor, TRUE);
@@ -668,7 +668,7 @@ test_monitor_file_event_deleted (TrackerMonitorTestFixture *fixture,
 
        /* Create file to test with, before setting up environment */
        set_file_contents (fixture->monitored_directory, "created.txt", "foo", &test_file);
-       g_assert (test_file != NULL);
+       g_assert_true (test_file != NULL);
 
        /* Set up environment */
        tracker_monitor_set_enabled (fixture->monitor, TRUE);
@@ -700,7 +700,7 @@ test_monitor_file_event_moved_to_monitored (TrackerMonitorTestFixture *fixture,
 
        /* Create file to test with, before setting up environment */
        set_file_contents (fixture->monitored_directory, "created.txt", "foo", &source_file);
-       g_assert (source_file != NULL);
+       g_assert_true (source_file != NULL);
 
        /* Set up environment */
        tracker_monitor_set_enabled (fixture->monitor, TRUE);
@@ -709,7 +709,7 @@ test_monitor_file_event_moved_to_monitored (TrackerMonitorTestFixture *fixture,
        source_path = g_file_get_path (source_file);
        dest_path = g_build_filename (fixture->monitored_directory, "renamed.txt", NULL);
        dest_file = g_file_new_for_path (dest_path);
-       g_assert (dest_file != NULL);
+       g_assert_true (dest_file != NULL);
 
        g_assert_cmpint (g_rename (source_path, dest_path), ==, 0);
 
@@ -747,7 +747,7 @@ test_monitor_file_event_moved_to_not_monitored (TrackerMonitorTestFixture *fixtu
 
        /* Create file to test with, before setting up environment */
        set_file_contents (fixture->monitored_directory, "created.txt", "foo", &source_file);
-       g_assert (source_file != NULL);
+       g_assert_true (source_file != NULL);
 
        /* Set up environment */
        tracker_monitor_set_enabled (fixture->monitor, TRUE);
@@ -756,7 +756,7 @@ test_monitor_file_event_moved_to_not_monitored (TrackerMonitorTestFixture *fixtu
        source_path = g_file_get_path (source_file);
        dest_path = g_build_filename (fixture->not_monitored_directory, "out.txt", NULL);
        dest_file = g_file_new_for_path (dest_path);
-       g_assert (dest_file != NULL);
+       g_assert_true (dest_file != NULL);
 
        g_assert_cmpint (g_rename (source_path, dest_path), ==, 0);
 
@@ -793,7 +793,7 @@ test_monitor_file_event_moved_from_not_monitored (TrackerMonitorTestFixture *fix
 
        /* Create file to test with, before setting up environment */
        set_file_contents (fixture->not_monitored_directory, "created.txt", "foo", &source_file);
-       g_assert (source_file != NULL);
+       g_assert_true (source_file != NULL);
 
        /* Set up environment */
        tracker_monitor_set_enabled (fixture->monitor, TRUE);
@@ -802,7 +802,7 @@ test_monitor_file_event_moved_from_not_monitored (TrackerMonitorTestFixture *fix
        source_path = g_file_get_path (source_file);
        dest_path = g_build_filename (fixture->monitored_directory, "in.txt", NULL);
        dest_file = g_file_new_for_path (dest_path);
-       g_assert (dest_file != NULL);
+       g_assert_true (dest_file != NULL);
 
        g_assert_cmpint (g_rename (source_path, dest_path), ==, 0);
 
@@ -841,7 +841,7 @@ test_monitor_directory_event_created (TrackerMonitorTestFixture *fixture,
 
        /* Create directory to test with */
        create_directory (fixture->monitored_directory, "directory", &test_dir);
-       g_assert (test_dir != NULL);
+       g_assert_true (test_dir != NULL);
        g_hash_table_insert (fixture->events,
                             g_object_ref (test_dir),
                             GUINT_TO_POINTER (MONITOR_SIGNAL_NONE));
@@ -870,7 +870,7 @@ test_monitor_directory_event_deleted (TrackerMonitorTestFixture *fixture,
         * before setting up the environment */
        create_directory (fixture->monitored_directory, "directory", &source_dir);
        source_path = g_file_get_path (source_dir);
-       g_assert (source_dir != NULL);
+       g_assert_true (source_dir != NULL);
 
        /* Set to monitor the new dir also */
        g_assert_cmpint (tracker_monitor_add (fixture->monitor, source_dir), ==, TRUE);
@@ -913,7 +913,7 @@ test_monitor_directory_event_moved_to_monitored (TrackerMonitorTestFixture *fixt
        /* Create directory to test with, before setting up the environment */
        create_directory (fixture->monitored_directory, "directory", &source_dir);
        source_path = g_file_get_path (source_dir);
-       g_assert (source_dir != NULL);
+       g_assert_true (source_dir != NULL);
 
        /* Add some file to the new dir */
        set_file_contents (source_path, "file.txt", "whatever", &file_in_source_dir);
@@ -931,7 +931,7 @@ test_monitor_directory_event_moved_to_monitored (TrackerMonitorTestFixture *fixt
                                              "file.txt",
                                              NULL);
        file_in_dest_dir = g_file_new_for_path (file_in_dest_dir_path);
-       g_assert (file_in_dest_dir != NULL);
+       g_assert_true (file_in_dest_dir != NULL);
 
        /* Now, rename the directory */
        dest_dir = g_file_get_parent (file_in_dest_dir);
@@ -997,7 +997,7 @@ test_monitor_directory_event_moved_to_monitored_after_file_create (TrackerMonito
        /* Create directory to test with, before setting up the environment */
        create_directory (fixture->monitored_directory, "directory", &source_dir);
        source_path = g_file_get_path (source_dir);
-       g_assert (source_dir != NULL);
+       g_assert_true (source_dir != NULL);
 
        /* Set up environment */
        tracker_monitor_set_enabled (fixture->monitor, TRUE);
@@ -1015,7 +1015,7 @@ test_monitor_directory_event_moved_to_monitored_after_file_create (TrackerMonito
                                              "file.txt",
                                              NULL);
        file_in_dest_dir = g_file_new_for_path (file_in_dest_dir_path);
-       g_assert (file_in_dest_dir != NULL);
+       g_assert_true (file_in_dest_dir != NULL);
 
        /* Now, rename the directory */
        dest_dir = g_file_get_parent (file_in_dest_dir);
@@ -1082,7 +1082,7 @@ test_monitor_directory_event_moved_to_monitored_after_file_update (TrackerMonito
        /* Create directory to test with, before setting up the environment */
        create_directory (fixture->monitored_directory, "directory", &source_dir);
        source_path = g_file_get_path (source_dir);
-       g_assert (source_dir != NULL);
+       g_assert_true (source_dir != NULL);
 
        /* Add some file to the new dir */
        set_file_contents (source_path, "file.txt", "whatever", &file_in_source_dir);
@@ -1100,7 +1100,7 @@ test_monitor_directory_event_moved_to_monitored_after_file_update (TrackerMonito
                                              "file.txt",
                                              NULL);
        file_in_dest_dir = g_file_new_for_path (file_in_dest_dir_path);
-       g_assert (file_in_dest_dir != NULL);
+       g_assert_true (file_in_dest_dir != NULL);
 
        /* Update file contents */
        set_file_contents (source_path, "file.txt", "hohoho", &file_in_source_dir);
@@ -1164,7 +1164,7 @@ test_monitor_directory_event_moved_to_not_monitored (TrackerMonitorTestFixture *
        /* Create directory to test with, before setting up the environment */
        create_directory (fixture->monitored_directory, "directory", &source_dir);
        source_path = g_file_get_path (source_dir);
-       g_assert (source_dir != NULL);
+       g_assert_true (source_dir != NULL);
 
        /* Set to monitor the new dir also */
        g_assert_cmpint (tracker_monitor_add (fixture->monitor, source_dir), ==, TRUE);
@@ -1216,7 +1216,7 @@ test_monitor_directory_event_moved_from_not_monitored (TrackerMonitorTestFixture
         * before setting up the environment */
        create_directory (fixture->not_monitored_directory, "foo", &source_dir);
        source_path = g_file_get_path (source_dir);
-       g_assert (source_dir != NULL);
+       g_assert_true (source_dir != NULL);
 
        /* Set up environment */
        tracker_monitor_set_enabled (fixture->monitor, TRUE);
@@ -1270,14 +1270,14 @@ test_monitor_basic (void)
        g_assert_cmpint (g_mkdir_with_parents (path_for_monitor, 00755), ==, 0);
 
        file_for_monitor = g_file_new_for_path (path_for_monitor);
-       g_assert (G_IS_FILE (file_for_monitor));
+       g_assert_true (G_IS_FILE (file_for_monitor));
 
        file_for_tmp = g_file_new_for_path (g_get_tmp_dir ());
-       g_assert (G_IS_FILE (file_for_tmp));
+       g_assert_true (G_IS_FILE (file_for_tmp));
 
        /* Create a monitor */
        monitor = tracker_monitor_new ();
-       g_assert (monitor != NULL);
+       g_assert_true (monitor != NULL);
 
        /* Test general API with monitors enabled */
        tracker_monitor_set_enabled (monitor, TRUE);
@@ -1322,13 +1322,13 @@ test_monitor_basic (void)
 
        /* Cleanup */
        g_assert_cmpint (g_rmdir (path_for_monitor), ==, 0);
-       g_assert (file_for_tmp != NULL);
+       g_assert_true (file_for_tmp != NULL);
        g_object_unref (file_for_tmp);
-       g_assert (file_for_monitor != NULL);
+       g_assert_true (file_for_monitor != NULL);
        g_object_unref (file_for_monitor);
-       g_assert (path_for_monitor != NULL);
+       g_assert_true (path_for_monitor != NULL);
        g_free (path_for_monitor);
-       g_assert (monitor != NULL);
+       g_assert_true (monitor != NULL);
        g_object_unref (monitor);
 }
 
diff --git a/tests/libtracker-miner/tracker-priority-queue-test.c 
b/tests/libtracker-miner/tracker-priority-queue-test.c
index 893ca14f9..33e1159d5 100644
--- a/tests/libtracker-miner/tracker-priority-queue-test.c
+++ b/tests/libtracker-miner/tracker-priority-queue-test.c
@@ -41,7 +41,7 @@ test_priority_queue_emptiness (void)
         
         one = tracker_priority_queue_new ();
 
-        g_assert (tracker_priority_queue_is_empty (one));
+        g_assert_true (tracker_priority_queue_is_empty (one));
         g_assert_cmpint (tracker_priority_queue_get_length (one), ==, 0);
 
         tracker_priority_queue_unref (one);
@@ -77,7 +77,7 @@ test_priority_queue_insertion_pop (void)
                 g_free (text);
         }
 
-        g_assert (tracker_priority_queue_is_empty (queue));        
+        g_assert_true (tracker_priority_queue_is_empty (queue));
         tracker_priority_queue_unref (queue);
 }
 
@@ -91,7 +91,7 @@ test_priority_queue_peek (void)
         queue = tracker_priority_queue_new ();
 
         result = tracker_priority_queue_peek (queue, &priority);
-        g_assert (result == NULL);
+        g_assert_true (result == NULL);
 
         tracker_priority_queue_add (queue, g_strdup ("Low prio"), 10);
         tracker_priority_queue_add (queue, g_strdup ("High prio"), 1);
@@ -217,8 +217,8 @@ test_priority_queue_branches (void)
         g_assert_cmpint (tracker_priority_queue_get_length (queue), ==, 3);
 
         /* Removal with multiple elements in same priority*/
-        g_assert (tracker_priority_queue_foreach_remove (queue, g_str_equal, "z", g_free));
-        g_assert (tracker_priority_queue_foreach_remove (queue, g_str_equal, "x", g_free));
+        g_assert_true (tracker_priority_queue_foreach_remove (queue, g_str_equal, "z", g_free));
+        g_assert_true (tracker_priority_queue_foreach_remove (queue, g_str_equal, "x", g_free));
         
 
         /* Pop those elements */
@@ -229,7 +229,7 @@ test_priority_queue_branches (void)
         g_assert_cmpint (tracker_priority_queue_get_length (queue), ==, 0);
         /* Pop on empty queue */
         result = tracker_priority_queue_pop (queue, &priority);
-        g_assert (result == NULL);
+        g_assert_true (result == NULL);
 
         tracker_priority_queue_unref (queue);
 }
diff --git a/tests/libtracker-miner/tracker-task-pool-test.c b/tests/libtracker-miner/tracker-task-pool-test.c
index c40266394..e43224435 100644
--- a/tests/libtracker-miner/tracker-task-pool-test.c
+++ b/tests/libtracker-miner/tracker-task-pool-test.c
@@ -33,7 +33,7 @@ test_task_pool_limit_set (void)
         tracker_task_pool_set_limit (pool, 3);
         g_assert_cmpint (tracker_task_pool_get_limit(pool), ==, 3);
 
-        g_assert (tracker_task_pool_limit_reached (pool) == FALSE);
+        g_assert_true (tracker_task_pool_limit_reached (pool) == FALSE);
         g_object_unref (pool);
 }
 
@@ -49,7 +49,7 @@ add_task (TrackerTaskPool *pool,
         tracker_task_pool_add (pool, task);
 
         g_assert_cmpint (tracker_task_pool_get_size (pool), ==, expected_size);
-        g_assert (tracker_task_pool_limit_reached (pool) == hit_limit);
+        g_assert_true (tracker_task_pool_limit_reached (pool) == hit_limit);
 
         return task;
 }
@@ -63,7 +63,7 @@ remove_task (TrackerTaskPool *pool,
         tracker_task_pool_remove (pool, task);
 
         g_assert_cmpint (tracker_task_pool_get_size (pool), ==, expected_size);
-        g_assert (hit_limit == tracker_task_pool_limit_reached (pool));
+        g_assert_true (hit_limit == tracker_task_pool_limit_reached (pool));
 
         g_object_unref (tracker_task_get_file (task));
         tracker_task_unref (task);
@@ -118,22 +118,22 @@ test_task_pool_find (void)
         /* Search first, last, in the middle... */
         goal = g_file_new_for_path ("/dev/null2");
         task = tracker_task_pool_find (pool, goal);
-        g_assert (task);
+        g_assert_true (task);
         g_object_unref (goal);
 
         goal = g_file_new_for_path ("/dev/null");
         task = tracker_task_pool_find (pool, goal);
-        g_assert (task);
+        g_assert_true (task);
         g_object_unref (goal);
 
         goal = g_file_new_for_path ("/dev/null3");
         task = tracker_task_pool_find (pool, goal);
-        g_assert (task);
+        g_assert_true (task);
         g_object_unref (goal);
 
         goal = g_file_new_for_path ("/dev/thisDoesntExists");
         task = tracker_task_pool_find (pool, goal);
-        g_assert (task == FALSE);
+        g_assert_true (task == FALSE);
         g_object_unref (goal);
 
         g_object_unref (pool);
diff --git a/tests/libtracker-miners-common/tracker-date-time-test.c 
b/tests/libtracker-miners-common/tracker-date-time-test.c
index b9fe67649..e9651bd84 100644
--- a/tests/libtracker-miners-common/tracker-date-time-test.c
+++ b/tests/libtracker-miners-common/tracker-date-time-test.c
@@ -139,7 +139,7 @@ test_date_to_string (void)
 
        result = tracker_date_to_string (input);
 
-       g_assert (result != NULL && strncmp (result, "2008-06-16T23:53:10Z", 19) == 0);
+       g_assert_true (result != NULL && strncmp (result, "2008-06-16T23:53:10Z", 19) == 0);
 
     g_free (result);
     g_free (original);
@@ -174,44 +174,44 @@ test_date_time_from_string ()
         g_value_init (&value, TRACKER_TYPE_DATE_TIME);
 
         tracker_date_time_set_from_string (&value, "2011-10-28T17:43:00+03:00", &error);
-        g_assert (!error);
+        g_assert_true (!error);
         g_assert_cmpint (tracker_date_time_get_time (&value), ==, 1319812980);
         g_assert_cmpint (tracker_date_time_get_offset (&value), ==, 10800);
 
 
         /* Negative offset */
         tracker_date_time_set_from_string (&value, "2011-10-28T17:43:00-03:00", &error);
-        g_assert (!error);
+        g_assert_true (!error);
         g_assert_cmpint (tracker_date_time_get_time (&value), ==, 1319834580);
         g_assert_cmpint (tracker_date_time_get_offset (&value), ==, -10800);
 
         /* No offset */
         tracker_date_time_set_from_string (&value, "2011-10-28T17:43:00Z", &error);
-        g_assert (!error);
+        g_assert_true (!error);
         g_assert_cmpint (tracker_date_time_get_time (&value), ==, 1319823780);
         g_assert_cmpint (tracker_date_time_get_offset (&value), ==, 0);
 
         /* Invalid format */
         tracker_date_time_set_from_string (&value, "2011-10-28T17:43:00Z0900", &error);
-        g_assert (error);
+        g_assert_true (error);
         g_error_free (error);
         error = NULL;
 
         /* There are no 28 months... */
         tracker_date_time_set_from_string (&value, "2011-28-10T17:43:00Z0900", &error);
-        g_assert (error);
+        g_assert_true (error);
         g_error_free (error);
         error = NULL;
 
         /* ... nor more than +-12 offsets */
         tracker_date_time_set_from_string (&value, "2011-28-10T17:43:00+17:00", &error);
-        g_assert (error);
+        g_assert_true (error);
         g_error_free (error);
         error = NULL;
 
         /* ... the same for the glory of the branch % */
         tracker_date_time_set_from_string (&value, "2011-28-10T17:43:00-17:00", &error);
-        g_assert (error);
+        g_assert_true (error);
         g_error_free (error);
         error = NULL;
 }
@@ -225,7 +225,7 @@ test_date_time_get_local_date ()
         g_value_init (&value, TRACKER_TYPE_DATE_TIME);
 
         tracker_date_time_set_from_string (&value, "2011-10-28T17:43:00+03:00", &error);
-        g_assert (!error);
+        g_assert_true (!error);
 
         g_assert_cmpint (tracker_date_time_get_local_date (&value), ==, 15275);
 }
@@ -239,7 +239,7 @@ test_date_time_get_local_time ()
         g_value_init (&value, TRACKER_TYPE_DATE_TIME);
 
         tracker_date_time_set_from_string (&value, "2011-10-28T17:43:00+03:00", &error);
-        g_assert (!error);
+        g_assert_true (!error);
 
         g_assert_cmpint (tracker_date_time_get_local_time (&value), ==, 63780);
 }
diff --git a/tests/libtracker-miners-common/tracker-file-utils-test.c 
b/tests/libtracker-miners-common/tracker-file-utils-test.c
index a00cac966..d0f6512f2 100644
--- a/tests/libtracker-miners-common/tracker-file-utils-test.c
+++ b/tests/libtracker-miners-common/tracker-file-utils-test.c
@@ -41,7 +41,7 @@ ensure_file_exists (const gchar *filename)
         g_autoptr(GError) error = NULL;
 
         if (!g_file_test (filename, G_FILE_TEST_EXISTS)) {
-                g_assert (g_file_set_contents (filename, "Just some stuff", -1, &error) == TRUE);
+                g_assert_true (g_file_set_contents (filename, "Just some stuff", -1, &error) == TRUE);
                 g_assert_no_error (error);
         }
 }
@@ -49,7 +49,7 @@ ensure_file_exists (const gchar *filename)
 static void
 remove_file (const gchar *filename)
 {
-        g_assert (g_file_test (filename, G_FILE_TEST_EXISTS));
+        g_assert_true (g_file_test (filename, G_FILE_TEST_EXISTS));
         g_assert_cmpint (g_remove (filename), ==, 0);
 }
 
@@ -96,9 +96,9 @@ test_path_list_filter_duplicates (void)
        result = tracker_path_list_filter_duplicates (input_as_list, ".", TRUE);
        g_assert_cmpint (3, ==, g_slist_length (result));
 
-       g_assert (string_in_list (result, "/home"));
-       g_assert (string_in_list (result, "/tmp"));
-       g_assert (string_in_list (result, "/usr"));
+       g_assert_true (string_in_list (result, "/home"));
+       g_assert_true (string_in_list (result, "/tmp"));
+       g_assert_true (string_in_list (result, "/usr"));
 
        g_slist_foreach (input_as_list, (GFunc) g_free, NULL);
        g_slist_foreach (result, (GFunc) g_free, NULL);
@@ -117,15 +117,15 @@ test_path_list_filter_duplicates_with_exceptions ()
 
         result = tracker_path_list_filter_duplicates (input_as_list, "/home/user/MyDocs", FALSE);
         g_assert_cmpint (g_slist_length (result), ==, 3);
-       g_assert (string_in_list (result, "/home/user/MyDocs"));
-       g_assert (string_in_list (result, "/home/user/MyDocs/.sounds"));
-       g_assert (string_in_list (result, "/home/user/MyDocs/visible"));
+       g_assert_true (string_in_list (result, "/home/user/MyDocs"));
+       g_assert_true (string_in_list (result, "/home/user/MyDocs/.sounds"));
+       g_assert_true (string_in_list (result, "/home/user/MyDocs/visible"));
        g_slist_foreach (result, (GFunc) g_free, NULL);
 
 
         result = tracker_path_list_filter_duplicates (input_as_list, "/home/user/MyDocs", TRUE);
         g_assert_cmpint (g_slist_length (result), ==, 1);
-       g_assert (string_in_list (result, "/home/user/MyDocs"));
+       g_assert_true (string_in_list (result, "/home/user/MyDocs"));
        g_slist_foreach (result, (GFunc) g_free, NULL);
 
        g_slist_foreach (input_as_list, (GFunc) g_free, NULL);
@@ -203,15 +203,15 @@ test_path_evaluate_name (void)
        g_free (expected);
 
        result = tracker_path_evaluate_name ("");
-       g_assert (!result);
+       g_assert_true (!result);
 
        result = tracker_path_evaluate_name (NULL);
-       g_assert (!result);
+       g_assert_true (!result);
 
 
         g_setenv ("HOME", "", TRUE);
         result = tracker_path_evaluate_name ("~/but-no-home.txt");
-        g_assert (!result);
+        g_assert_true (!result);
         g_setenv ("HOME", home, TRUE);
 
         result = tracker_path_evaluate_name ("$UNDEFINED/something");
@@ -284,15 +284,15 @@ test_file_utils_open_close ()
         FILE *f;
 
         f = tracker_file_open (TEST_FILENAME);
-        g_assert (f);
+        g_assert_true (f);
         tracker_file_close (f, TRUE);
 
         f = tracker_file_open (TEST_FILENAME);
-        g_assert (f);
+        g_assert_true (f);
         tracker_file_close (f, FALSE);
 
         f = tracker_file_open ("./file-does-NOT-exist");
-        g_assert (!f);
+        g_assert_true (!f);
 }
 
 static void
@@ -368,11 +368,11 @@ static void
 test_file_system_has_enough_space ()
 {
         /* Hopefully we will always have 1 byte free... */
-        g_assert (tracker_file_system_has_enough_space ("/home", 1, FALSE));
-        g_assert (tracker_file_system_has_enough_space ("/home", 1, TRUE));
+        g_assert_true (tracker_file_system_has_enough_space ("/home", 1, FALSE));
+        g_assert_true (tracker_file_system_has_enough_space ("/home", 1, TRUE));
 
         /* gulong goes only up to 4Gb. Cannot ask for unreasonable amount of space */
-        //g_assert (!tracker_file_system_has_enough_space ("/home", G_MAXULONG, FALSE));
+        //g_assert_true (!tracker_file_system_has_enough_space ("/home", G_MAXULONG, FALSE));
 }
 
 static void
@@ -385,19 +385,19 @@ test_file_exists_and_writable ()
         }
 
         /* This should create the directory with write access*/
-        g_assert (tracker_path_has_write_access_or_was_created (path));
-        g_assert (g_file_test (path, G_FILE_TEST_EXISTS));
+        g_assert_true (tracker_path_has_write_access_or_was_created (path));
+        g_assert_true (g_file_test (path, G_FILE_TEST_EXISTS));
 
         /* This time exists and has write access */
-        g_assert (tracker_path_has_write_access_or_was_created (path));
+        g_assert_true (tracker_path_has_write_access_or_was_created (path));
 
         g_assert_cmpint (chmod (path, S_IRUSR & S_IRGRP), ==, 0);
 
         /* Exists but is not writable */
-        g_assert (!tracker_path_has_write_access_or_was_created (path));
+        g_assert_true (!tracker_path_has_write_access_or_was_created (path));
 
         /* Doesn't exist and cannot be created */
-        g_assert (!tracker_path_has_write_access_or_was_created ("/var/log/tracker-test"));
+        g_assert_true (!tracker_path_has_write_access_or_was_created ("/var/log/tracker-test"));
 
         g_remove (path);
 }
@@ -410,11 +410,11 @@ test_file_utils_is_hidden ()
         ensure_file_exists ("./non-hidden-test-file");
 
         f = g_file_new_for_path (TEST_HIDDEN_FILENAME);
-        g_assert (tracker_file_is_hidden (f));
+        g_assert_true (tracker_file_is_hidden (f));
         g_object_unref (f);
 
         f = g_file_new_for_path ("./non-hidden-test-file");
-        g_assert (!tracker_file_is_hidden (f));
+        g_assert_true (!tracker_file_is_hidden (f));
         g_object_unref (f);
 
         remove_file ("./non-hidden-test-file");
@@ -429,8 +429,8 @@ test_file_utils_cmp ()
         two = g_file_new_for_path (TEST_FILENAME);
         three = g_file_new_for_path (TEST_HIDDEN_FILENAME);
 
-        g_assert (!tracker_file_cmp (one, two));
-        g_assert (tracker_file_cmp (two, three));
+        g_assert_true (!tracker_file_cmp (one, two));
+        g_assert_true (tracker_file_cmp (two, three));
 }
 
 int
diff --git a/tests/libtracker-miners-common/tracker-sched-test.c 
b/tests/libtracker-miners-common/tracker-sched-test.c
index 72bae3247..9cb8d7fdf 100644
--- a/tests/libtracker-miners-common/tracker-sched-test.c
+++ b/tests/libtracker-miners-common/tracker-sched-test.c
@@ -44,9 +44,9 @@ scheduler_is (gint scheduler)
 static void
 test_sched_set_and_get (void)
 {
-        g_assert (tracker_sched_idle ());
+        g_assert_true (tracker_sched_idle ());
 #ifdef __linux__
-        g_assert (scheduler_is (SCHED_IDLE));
+        g_assert_true (scheduler_is (SCHED_IDLE));
 #endif
 }
 
diff --git a/tests/libtracker-miners-common/tracker-type-utils-test.c 
b/tests/libtracker-miners-common/tracker-type-utils-test.c
index 03a811da7..d7134e6e8 100644
--- a/tests/libtracker-miners-common/tracker-type-utils-test.c
+++ b/tests/libtracker-miners-common/tracker-type-utils-test.c
@@ -71,11 +71,11 @@ test_string_in_gslist (void)
         input = g_slist_prepend (input, g_strdup ("three"));
         input = g_slist_prepend (input, g_strdup ("four"));
 
-        g_assert (tracker_string_in_gslist ("one", input));
-        g_assert (tracker_string_in_gslist ("two", input));
-        g_assert (tracker_string_in_gslist ("three", input));
-        g_assert (tracker_string_in_gslist ("four", input));
-        g_assert (!tracker_string_in_gslist ("five", input));
+        g_assert_true (tracker_string_in_gslist ("one", input));
+        g_assert_true (tracker_string_in_gslist ("two", input));
+        g_assert_true (tracker_string_in_gslist ("three", input));
+        g_assert_true (tracker_string_in_gslist ("four", input));
+        g_assert_true (!tracker_string_in_gslist ("five", input));
 
         g_slist_foreach (input, (GFunc)g_free, NULL);
         g_slist_free (input);
@@ -102,7 +102,7 @@ test_gslist_to_string_list (void)
        g_strfreev (result);
 
        result = tracker_gslist_to_string_list (NULL);
-       g_assert (result != NULL);
+       g_assert_true (result != NULL);
        g_strfreev (result);
 }
 
@@ -113,26 +113,26 @@ test_string_list_to_gslist (void)
         GSList *result = NULL;
 
         result = tracker_string_list_to_gslist ((gchar **)input, -1);
-        g_assert (result);
+        g_assert_true (result);
         g_assert_cmpint (g_slist_length (result), ==, 4);
 
         /* This function is tested in other test, so it should work or fail there also */
-        g_assert (tracker_string_in_gslist ("one", result));
-        g_assert (tracker_string_in_gslist ("two", result));
-        g_assert (tracker_string_in_gslist ("three", result));
-        g_assert (tracker_string_in_gslist ("four", result));
+        g_assert_true (tracker_string_in_gslist ("one", result));
+        g_assert_true (tracker_string_in_gslist ("two", result));
+        g_assert_true (tracker_string_in_gslist ("three", result));
+        g_assert_true (tracker_string_in_gslist ("four", result));
 
         g_slist_foreach (result, (GFunc)g_free, NULL);
         g_slist_free (result);
 
         result = tracker_string_list_to_gslist ((gchar **)input, 2);
-        g_assert (result);
+        g_assert_true (result);
         g_assert_cmpint (g_slist_length (result), ==, 2);
 
-        g_assert (tracker_string_in_gslist ("one", result));
-        g_assert (tracker_string_in_gslist ("two", result));
-        g_assert (!tracker_string_in_gslist ("three", result));
-        g_assert (!tracker_string_in_gslist ("four", result));
+        g_assert_true (tracker_string_in_gslist ("one", result));
+        g_assert_true (tracker_string_in_gslist ("two", result));
+        g_assert_true (!tracker_string_in_gslist ("three", result));
+        g_assert_true (!tracker_string_in_gslist ("four", result));
 }
 
 static void 
@@ -159,23 +159,23 @@ test_gslist_with_string_data_equal (void)
         list1 = g_slist_prepend (list1, g_strdup ("two"));
         list1 = g_slist_prepend (list1, g_strdup ("three"));
 
-        g_assert (tracker_gslist_with_string_data_equal (list1, list1));
+        g_assert_true (tracker_gslist_with_string_data_equal (list1, list1));
 
         shorty = g_slist_prepend (shorty, g_strdup ("one"));
-        g_assert (!tracker_gslist_with_string_data_equal (list1, shorty));
-        g_assert (!tracker_gslist_with_string_data_equal (shorty, list1));
+        g_assert_true (!tracker_gslist_with_string_data_equal (list1, shorty));
+        g_assert_true (!tracker_gslist_with_string_data_equal (shorty, list1));
 
         list2 = g_slist_prepend (list2, g_strdup ("one"));
         list2 = g_slist_prepend (list2, g_strdup ("two"));
         list2 = g_slist_prepend (list2, g_strdup ("three"));
-        g_assert (tracker_gslist_with_string_data_equal (list1, list2));
-        g_assert (tracker_gslist_with_string_data_equal (list2, list1));
+        g_assert_true (tracker_gslist_with_string_data_equal (list1, list2));
+        g_assert_true (tracker_gslist_with_string_data_equal (list2, list1));
 
         list3 = g_slist_prepend (list3, g_strdup ("one"));
         list3 = g_slist_prepend (list3, g_strdup ("something different"));
         list3 = g_slist_prepend (list3, g_strdup ("three"));
-        g_assert (!tracker_gslist_with_string_data_equal (list1, list3));
-        g_assert (!tracker_gslist_with_string_data_equal (list3, list1));
+        g_assert_true (!tracker_gslist_with_string_data_equal (list1, list3));
+        g_assert_true (!tracker_gslist_with_string_data_equal (list3, list1));
 
         g_slist_foreach (list1, (GFunc)g_free, NULL);
         g_slist_foreach (list2, (GFunc)g_free, NULL);
diff --git a/tests/libtracker-miners-common/tracker-utils-test.c 
b/tests/libtracker-miners-common/tracker-utils-test.c
index 1fae42618..f15c68506 100644
--- a/tests/libtracker-miners-common/tracker-utils-test.c
+++ b/tests/libtracker-miners-common/tracker-utils-test.c
@@ -78,22 +78,22 @@ test_seconds_estimate_to_string ()
 static void
 test_is_empty_string ()
 {
-        g_assert (tracker_is_empty_string (NULL));
-        g_assert (tracker_is_empty_string (""));
-        g_assert (!tracker_is_empty_string ("Eeeeepa not empty"));
+        g_assert_true (tracker_is_empty_string (NULL));
+        g_assert_true (tracker_is_empty_string (""));
+        g_assert_true (!tracker_is_empty_string ("Eeeeepa not empty"));
 }
 
 static void
 test_is_blank_string ()
 {
-        g_assert (tracker_is_blank_string (NULL));
-        g_assert (tracker_is_blank_string (""));
-        g_assert (tracker_is_blank_string (" "));
-        g_assert (tracker_is_blank_string ("       "));
-        g_assert (!tracker_is_blank_string ("   -    "));
-        g_assert (!tracker_is_blank_string ("   -"));
-        g_assert (!tracker_is_blank_string ("-   "));
-        g_assert (!tracker_is_blank_string ("nonono"));
+        g_assert_true (tracker_is_blank_string (NULL));
+        g_assert_true (tracker_is_blank_string (""));
+        g_assert_true (tracker_is_blank_string (" "));
+        g_assert_true (tracker_is_blank_string ("       "));
+        g_assert_true (!tracker_is_blank_string ("   -    "));
+        g_assert_true (!tracker_is_blank_string ("   -"));
+        g_assert_true (!tracker_is_blank_string ("-   "));
+        g_assert_true (!tracker_is_blank_string ("nonono"));
 
 }
 


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