Skip to content

Commit

Permalink
Fix espresso test syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
growse committed Aug 24, 2023
1 parent e6523b1 commit 47ffad4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fun withActionIconDrawable(@DrawableRes resourceId: Int): Matcher<View?>? {
override fun matchesSafely(actionMenuItemView: ActionMenuItemView): Boolean {
return sameBitmap(
actionMenuItemView.context,
actionMenuItemView.itemData.icon,
actionMenuItemView.itemData.icon!!,
resourceId,
actionMenuItemView
)
Expand Down Expand Up @@ -74,7 +74,8 @@ private fun sameBitmap(
private fun getBitmapFromDrawable(drawable: Drawable): Bitmap =
Bitmap.createBitmap(
drawable.intrinsicWidth,
drawable.intrinsicHeight, Bitmap.Config.ARGB_8888
drawable.intrinsicHeight,
Bitmap.Config.ARGB_8888
).apply {
val canvas = Canvas(this)
drawable.setBounds(0, 0, canvas.width, canvas.height)
Expand Down

0 comments on commit 47ffad4

Please sign in to comment.