[librsvg: 1/11] Add missing tests for rsvg_handle_get_title/desc/metadata
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/11] Add missing tests for rsvg_handle_get_title/desc/metadata
- Date: Tue, 9 Aug 2022 18:59:28 +0000 (UTC)
commit 3220a37708c617264a3dbcdab231f9ecabae6d42
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Aug 5 19:43:47 2022 -0500
Add missing tests for rsvg_handle_get_title/desc/metadata
These functions all are deprecated and return NULL.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/727>
tests/api.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/tests/api.c b/tests/api.c
index 5c494a4d8..3321803d2 100644
--- a/tests/api.c
+++ b/tests/api.c
@@ -294,11 +294,18 @@ noops (void)
rsvg_init ();
rsvg_term ();
rsvg_cleanup ();
+}
- /* Just test that these are in the binary */
- g_assert_nonnull (rsvg_handle_get_title);
- g_assert_nonnull (rsvg_handle_get_desc);
- g_assert_nonnull (rsvg_handle_get_metadata);
+static void
+noops_return_null (void)
+{
+ RsvgHandle *handle = rsvg_handle_new ();
+
+ g_assert_null (rsvg_handle_get_title (handle));
+ g_assert_null (rsvg_handle_get_desc (handle));
+ g_assert_null (rsvg_handle_get_metadata (handle));
+
+ g_object_unref (handle);
}
static void
@@ -1662,6 +1669,7 @@ add_api_tests (void)
g_test_add_func ("/api/flags_registration", flags_registration);
g_test_add_func ("/api/error_registration", error_registration);
g_test_add_func ("/api/noops", noops);
+ g_test_add_func ("/api/noops_return_null", noops_return_null);
g_test_add_func ("/api/set_dpi", set_dpi);
g_test_add_func ("/api/base_uri", base_uri);
g_test_add_func ("/api/base_gfile", base_gfile);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]