Commit 46f456cf authored by Ivan Frade's avatar Ivan Frade

tests/libtracker-extract: Fix mem-leaks in the tests

No memleaks in the tests help us to find memory leaks in the real code!
parent 3f2084a5
......@@ -303,6 +303,11 @@ test_xmp_apply (void)
*/
/* g_assert_cmpint (tracker_sparql_builder_get_length (metadata), ==, 50); */
g_string_free (where, TRUE);
g_object_unref (metadata);
g_object_unref (preupdate);
tracker_xmp_free (data);
}
static void
......@@ -390,6 +395,8 @@ test_xmp_regions (void)
data = tracker_xmp_new (contents, size, "test://file");
g_free (contents);
g_assert_cmpint (2, ==, g_slist_length (data->regions));
region = g_slist_nth_data (data->regions, 1);
......@@ -435,6 +442,8 @@ test_xmp_regions_quill (void)
data = tracker_xmp_new (contents, size, "test://file");
g_free (contents);
g_assert_cmpint (2, ==, g_slist_length (data->regions));
region = g_slist_nth_data (data->regions, 1);
......@@ -481,6 +490,8 @@ test_xmp_regions_ns_prefix (void)
data = tracker_xmp_new (contents, size, "test://file");
g_free (contents);
g_assert_cmpint (2, ==, g_slist_length (data->regions));
region = g_slist_nth_data (data->regions, 1);
......@@ -524,6 +535,8 @@ test_xmp_regions_nb282393 ()
data = tracker_xmp_new (contents, size, "test://file");
g_free (contents);
g_assert_cmpint (1, ==, g_slist_length (data->regions));
/* Regions are stacked while parsing.*/
......@@ -558,6 +571,8 @@ test_xmp_regions_nb282393_2 ()
data = tracker_xmp_new (contents, size, "test://file");
g_free (contents);
g_assert_cmpint (1, ==, g_slist_length (data->regions));
/* Regions are stacked while parsing.*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment