-
Notifications
You must be signed in to change notification settings - Fork 567
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
Rendering tests #784
Rendering tests #784
Conversation
16438e7
to
2140c1b
Compare
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.
Okay I think all things considered this is a reasonable way to get the functionality we want, and we're allowed to be more hacky with testing code.
That said, I think it is important that future explorers of this code have some more hints about what is going on; if you can try and add some docs etc I will clean them up.
2fdb202
to
4a3642e
Compare
a3805bc
to
49835b0
Compare
vec![41, 41, 41, 255].repeat(100), | ||
] | ||
.concat(); | ||
assert_eq!(raw_pixels[399 * 600 * 4..400 * 600 * 4], expecting[..]); |
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.
@raphlinus I think you did a lot of the piet logic, can you think of a nicer way to do this. I have made these tests so that they should be very stable but if people want to use this for more complex widgets then crafting a expected slice could get quite trouble some especially if they are not to be pretty fragile.
I was thinking of maybe using piet to create a similar image and then comparing the hole things but I'm not sure that would be very helpful.
Maybe for another MR but do you have any ideas?
961b3b9
to
94ee520
Compare
bb3d301
to
8454c76
Compare
8454c76
to
d6e59d9
Compare
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.
Mostly grammar related stuff. However I'm also wondering about the temp dir/files lifetime.
d6e59d9
to
f47e398
Compare
8454296
to
04c229e
Compare
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.
Just a few more.
dd32ed0
to
4bdc3fe
Compare
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.
Okay I think this is at a decent enough place now to merge. Thanks!
4bdc3fe
to
2996ae2
Compare
2996ae2
to
5eb90b9
Compare
5eb90b9
to
1ad10a2
Compare
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.
Thanks!
The last few commits need cleaning up but I am generally keen to get some good feed back before I clean them up.
This PR adds:
This PR should complete #527