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

Fix ShadowBitmapFactoryTest in non-Gradle environments #6276

Merged
merged 1 commit into from Mar 10, 2021

Conversation

hoisie
Copy link
Contributor

@hoisie hoisie commented Mar 10, 2021

In Bazel environments, calling URL.getFile on a resource URL does not
result in a file that exists. Instead, to test ShadowBitmap.decodeFile
and ShadowBitmap.decodeFileDescriptor, use URL.openStream and copy the
image contents to a temp file, which can then be used for testing.

In Bazel environments, calling URL.getFile on a resource URL does not
result in a file that exists. Instead, to test ShadowBitmap.decodeFile
and ShadowBitmap.decodeFileDescriptor, use URL.openStream and copy the
image contents to a temp file, which can then be used for testing.
@hoisie hoisie merged commit 4d32b03 into robolectric:master Mar 10, 2021
@hoisie hoisie deleted the fix-resource branch March 10, 2021 06:56
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.

None yet

1 participant