Commit 1a5ca2f6 authored by Chinmay Garde's avatar Chinmay Garde Committed by GitHub

Fix failing tooltip_test.dart by avoiding floating point comparisons. (#4781)

parent b8bcd62e
......@@ -70,7 +70,11 @@ void main() {
*********************/
RenderBox tip = tester.renderObject(find.text('TIP')).parent.parent.parent.parent.parent;
expect(tip.localToGlobal(tip.size.topLeft(Point.origin)), equals(const Point(284.0, 20.0)));
// See "_applyFloatingPointHack"
Point tipInGlobal = tip.localToGlobal(tip.size.topLeft(Point.origin));
expect(tipInGlobal.x.floor(), 284);
expect(tipInGlobal.y.floor(), 20);
});
testWidgets('Does tooltip end up in the right place - top left', (WidgetTester tester) async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment