mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 14:50:03 -04:00
Be more forgiving in our comparison
This commit is contained in:
@@ -1107,9 +1107,10 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Don't compare for equaliity; but format with a specific precision and make sure we hit that.
|
// 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!(
|
similar_asserts::assert_eq!(
|
||||||
format!("{:#.5?}", split),
|
format!("{:#.1?}", split),
|
||||||
format!("{:#.5?}", whole),
|
format!("{:#.1?}", whole),
|
||||||
"pixels_per_point: {pixels_per_point:.2}, input text: '{}'",
|
"pixels_per_point: {pixels_per_point:.2}, input text: '{}'",
|
||||||
job.text
|
job.text
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user