You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See code below. Adding assertFalse(bitmap1.sameAs(bitmap2)) makes the test fail; even though the bitmaps should have different colours and letters they are both blank and identical.
Robolectric & Android Version
4.10.3 & N/A
Link to a public git repo demonstrating the problem:
Test that uses that code and produces an unexpectedly empty transparent bitmap (e.g. when exported via bitmap.compress(Bitmap.CompressFormat.PNG, 100, fileOutputStream):
Description
Drawing a letter on a canvas with
.drawText()
to produce a bitmap works as expected on Android devices but produces an empty bitmap during unit tests.This issue seems similar to #7188.
Steps to Reproduce
See code below. Adding
assertFalse(bitmap1.sameAs(bitmap2))
makes the test fail; even though the bitmaps should have different colours and letters they are both blank and identical.Robolectric & Android Version
4.10.3 & N/A
Link to a public git repo demonstrating the problem:
Code that uses
.drawText()
on a canvas:https://github.com/CatimaLoyalty/Android/blob/b9d9c8d/app/src/main/java/protect/card_locker/LetterBitmap.java#L93
Test that uses that code and produces an unexpectedly empty transparent bitmap (e.g. when exported via
bitmap.compress(Bitmap.CompressFormat.PNG, 100, fileOutputStream)
:https://github.com/CatimaLoyalty/Android/blob/b9d9c8d/app/src/test/java/protect/card_locker/ImportExportTest.java#L758
cc @TheLastProject
The text was updated successfully, but these errors were encountered: