Skip to content
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

Fixes onlyScaleDown() when targetWidth or targetHeight is 0 #1456

Merged
merged 1 commit into from
Jul 20, 2016

Conversation

avsector
Copy link
Contributor

Resolves #1432


ShadowBitmap shadowBitmap = shadowOf(result);
assertThat(shadowBitmap.getCreatedFromBitmap()).isNull();
assertThat(shadowBitmap.getCreatedFromBitmap()).isNotSameAs(source);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test logic is wrong (it looks copy/pasted). If we already check the value is null there's no reason to check it against something else.

I suspect it was meant to be assertThat(result).isNotSameAs(source) in the original test and here it should be isSameAs.

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 took the code from onlyScaleDownOriginalSmaller() which has the same logic. Is that test faulty, too?

@JakeWharton JakeWharton merged commit 77ab1a0 into square:master Jul 20, 2016
@JakeWharton
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants