Skip to content

Conversation

@Hixie
Copy link
Contributor

@Hixie Hixie commented Jan 26, 2017

I got as far as line 830.

@abarth
Copy link
Contributor

abarth commented Jan 26, 2017

LGTM

expect(box.aspectRatio, 1.0);
box.aspectRatio = 0.2;
expect(box.aspectRatio, 0.2);
box.aspectRatio = 1.2;
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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).

@Hixie Hixie merged commit 7c40446 into flutter:master Jan 26, 2017
@Hixie Hixie deleted the proxy-box-tests branch January 26, 2017 16:00
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants