Skip to content

Commit 77d2946

Browse files
committed
Corrected after executing test suite
1 parent eb1ef78 commit 77d2946

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plotters/src/element/text.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ fn layout_multiline_text<'a, F: FnMut(&'a str)>(
165165
}
166166

167167
#[cfg(test)]
168+
#[cfg(ttf)]
168169
#[test]
169170
fn test_multi_layout() {
170171
use plotters_backend::{FontFamily, FontStyle};
@@ -177,7 +178,9 @@ fn test_multi_layout() {
177178
});
178179

179180
let font = FontDesc::new(FontFamily::SansSerif, 20 as f64, FontStyle::Bold);
180-
layout_multiline_text("öä", 40, font, |txt| {
181+
layout_multiline_text("öä", 100, font, |txt| {
182+
// This does not divide the line, but still crashed in the previous implementation
183+
// of layout_multiline_text. So this test should be reliable
181184
println!("Got: {}", txt);
182185
assert_eq!(txt, "öä")
183186
});

0 commit comments

Comments
 (0)