[librsvg: 12/13] Remove test for empty text after all




commit fdbbcd15bc2ea28e4e29976a93c0a5c9c00d905e
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Feb 7 13:21:34 2022 -0600

    Remove test for empty text after all
    
    Maybe this is done better before actually laying out text.
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/660>

 src/drawing_ctx.rs | 25 -------------------------
 1 file changed, 25 deletions(-)
---
diff --git a/src/drawing_ctx.rs b/src/drawing_ctx.rs
index 609f4ad4c..7a0d90041 100644
--- a/src/drawing_ctx.rs
+++ b/src/drawing_ctx.rs
@@ -2297,29 +2297,4 @@ mod tests {
             ],
         );
     }
-
-    #[test]
-    fn empty_or_whitespace_text_yields_empty_path() {
-        let context = create_pango_context(
-            &FontOptions {
-                options: cairo::FontOptions::new().unwrap(),
-            },
-            &Transform::identity(),
-        );
-
-        // empty text
-
-        let layout = pango::Layout::new(&context);
-        layout.set_text("");
-
-        let path = pango_layout_to_path(10.0, 20.0, &layout, pango::Gravity::Auto).unwrap();
-        assert!(path.is_empty());
-
-        // only whitespace
-
-        layout.set_text(" ");
-
-        let path = pango_layout_to_path(10.0, 20.0, &layout, pango::Gravity::Auto).unwrap();
-        assert!(path.is_empty());
-    }
 }


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