[librsvg: 10/11] tests/api.c: Test rsvg_handle_get_position_sub(..., id=NULL)
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 10/11] tests/api.c: Test rsvg_handle_get_position_sub(..., id=NULL)
- Date: Tue, 9 Aug 2022 18:59:29 +0000 (UTC)
commit 3431e3a1901b2652285fde274c172166b7e21f06
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Aug 9 13:11:49 2022 -0500
tests/api.c: Test rsvg_handle_get_position_sub(..., id=NULL)
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/727>
tests/api.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/tests/api.c b/tests/api.c
index c867d9ad2..4b7f747e8 100644
--- a/tests/api.c
+++ b/tests/api.c
@@ -637,6 +637,11 @@ dimensions_and_position (void)
g_assert_false (rsvg_handle_get_position_sub (handle, &pos, EXAMPLE_NONEXISTENT_ID));
g_assert_false (rsvg_handle_get_dimensions_sub (handle, &dim, EXAMPLE_NONEXISTENT_ID));
+ /* Asking for "position of the whole SVG" (id=NULL) always returns (0, 0) */
+ g_assert (rsvg_handle_get_position_sub (handle, &pos, NULL));
+ g_assert_cmpint (pos.x, ==, 0);
+ g_assert_cmpint (pos.y, ==, 0);
+
g_object_unref (handle);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]