-
Notifications
You must be signed in to change notification settings - Fork 29.7k
proxy_box tests #7658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proxy_box tests #7658
Conversation
| expect(box.aspectRatio, 1.0); | ||
| box.aspectRatio = 0.2; | ||
| expect(box.aspectRatio, 0.2); | ||
| box.aspectRatio = 1.2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you want to check whether these properly invalidate layout? I'm on the fence whether it's necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't been worrying about assert coverage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If they threw pretty FlutterErrors I would.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I misread your comment. Sorry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered it, but haven't, obviously. We could. It would be a bit of a paint since you'd have to clean it between each test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's also not an error we've made often (at all?). I'm ok skipping checking it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we've made the mistake a few times, but the real problem is that it's not at all clear to me that we would know to check the right bits are hit in the test. I mean, why wouldn't we just make the same mistake in the test as the code. I'd rather do end to end tests at the Widgets layer, where you verify metrics or paint or whatever when changing values (like i did with the axis direction bug earlier today).

I got as far as line 830.