diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-12-29 14:05:30 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-01-01 22:53:00 -0500 |
commit | 225857ac43eb4ffb4b43d6200804d8c9ebfb8b46 (patch) | |
tree | 49862b8b6ec000772bf1d880652c4e0b7f8fa0f0 /tests | |
parent | 024ee9adea386e190e174db848dd1ff16dac5d6a (diff) | |
download | pango-225857ac43eb4ffb4b43d6200804d8c9ebfb8b46.tar.gz |
test-ellipsize: Tweak
Best to compare precise sizes and take rounding
out of the equation.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-ellipsize.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-ellipsize.c b/tests/test-ellipsize.c index a9441d5a..163184ff 100644 --- a/tests/test-ellipsize.c +++ b/tests/test-ellipsize.c @@ -43,14 +43,14 @@ test_ellipsize_height (void) pango_layout_set_text (layout, "some text that should be ellipsized", -1); g_assert_cmpint (pango_layout_get_line_count (layout), ==, 1); - pango_layout_get_pixel_size (layout, NULL, &height1); + pango_layout_get_size (layout, NULL, &height1); pango_layout_set_width (layout, 100 * PANGO_SCALE); pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END); g_assert_cmpint (pango_layout_get_line_count (layout), ==, 1); g_assert_cmpint (pango_layout_is_ellipsized (layout), ==, 1); - pango_layout_get_pixel_size (layout, NULL, &height2); + pango_layout_get_size (layout, NULL, &height2); g_assert_cmpint (height1, ==, height2); |