diff options
author | Federico Mena Quintero <federico@gnome.org> | 2022-08-09 13:11:49 -0500 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2022-08-09 18:46:17 +0000 |
commit | 3431e3a1901b2652285fde274c172166b7e21f06 (patch) | |
tree | bf50a1b3ace69894aa5f8730ddad980c39afd0a4 /tests | |
parent | a661bfc8e781f607f24cf7599ade3131e2cc2991 (diff) | |
download | librsvg-3431e3a1901b2652285fde274c172166b7e21f06.tar.gz |
tests/api.c: Test rsvg_handle_get_position_sub(..., id=NULL)
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/727>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/api.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/api.c b/tests/api.c index c867d9ad..4b7f747e 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); } |