[pango/matthiasc/for-main: 2/2] test-ellipsize: Tweak




commit 225857ac43eb4ffb4b43d6200804d8c9ebfb8b46
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Dec 29 14:05:30 2021 -0500

    test-ellipsize: Tweak
    
    Best to compare precise sizes and take rounding
    out of the equation.

 tests/test-ellipsize.c | 4 ++--
 1 file 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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]