androidx.test.core.graphics


Extension functions summary

Unit

Writes the contents of the Bitmap to a compressed png file on TestStorage

Unit

Writes the contents of the Bitmap to a compressed png file to the given PlatformTestStorage

Extension functions

writeToTestStorage

@ExperimentalTestApi
fun Bitmap.writeToTestStorage(name: String): Unit

Writes the contents of the Bitmap to a compressed png file on TestStorage

Parameters
name: String

a descriptive base name for the resulting file. '.png' will be appended to this name.

Throws
java.io.IOException

if bitmap could not be compressed or written to ds

writeToTestStorage

@ExperimentalTestApi
fun Bitmap.writeToTestStorage(
    testStorage: PlatformTestStorage,
    name: String
): Unit

Writes the contents of the Bitmap to a compressed png file to the given PlatformTestStorage

Parameters
testStorage: PlatformTestStorage

the PlatformTestStorage to use

name: String

a descriptive base name for the resulting file

Throws
java.io.IOException

if bitmap could not be compressed or written to storage