1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

Make test a bit more forgiving

This commit is contained in:
Emil Ernerfeldt
2025-03-28 20:08:47 +01:00
parent cbc3c33051
commit 25f647322e

View File

@@ -1085,9 +1085,10 @@ mod tests {
); );
} }
// Don't compare for equaliity; but format with a specific precision and make sure we hit that.
similar_asserts::assert_eq!( similar_asserts::assert_eq!(
split, format!("{:#.5?}", split),
whole, format!("{:#.5?}", whole),
"pixels_per_point: {pixels_per_point:.2}, input text: '{}'", "pixels_per_point: {pixels_per_point:.2}, input text: '{}'",
job.text job.text
); );