1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

Be more forgiving in our comparison

This commit is contained in:
Emil Ernerfeldt
2025-03-30 20:29:52 +02:00
parent a72e10ab23
commit 00ed9c1547

View File

@@ -1107,9 +1107,10 @@ mod tests {
}
// Don't compare for equaliity; but format with a specific precision and make sure we hit that.
// NOTE: we use a rather low precision, because as long as we're within a pixel I think it's good enough.
similar_asserts::assert_eq!(
format!("{:#.5?}", split),
format!("{:#.5?}", whole),
format!("{:#.1?}", split),
format!("{:#.1?}", whole),
"pixels_per_point: {pixels_per_point:.2}, input text: '{}'",
job.text
);