The Developer Preview for Android 11 is now available; test it out and share your feedback.

CollectedSizes

class CollectedSizes
kotlin.Any
   ↳ androidx.ui.test.CollectedSizes

Small utility class to provide convenient assertion for width and height for some PxSize. It also provides Density while asserting.

Summary

Public constructors

<init>(size: PxSize, density: Density)

Small utility class to provide convenient assertion for width and height for some PxSize.

Public methods

CollectedSizes
assertHeightEqualsTo(expectedHeight: Dp)

CollectedSizes
assertHeightEqualsTo(expectedHeightPx: Density.() -> IntPx)

CollectedSizes
assertIsSquareWithSize(expectedSize: Dp)

CollectedSizes
assertIsSquareWithSize(expectedSquarePx: Density.() -> IntPx)

CollectedSizes
assertWidthEqualsTo(expectedWidth: Dp)

CollectedSizes
assertWidthEqualsTo(expectedWidthPx: Density.() -> IntPx)

Inherited extension functions

From androidx.compose
operator T

IMPORTANT: This global operator is TEMPORARY, and should be removed whenever an answer for contextual composers is reached.

Public constructors

<init>

CollectedSizes(
    size: PxSize,
    density: Density)

Small utility class to provide convenient assertion for width and height for some PxSize. It also provides Density while asserting.

Public methods

assertHeightEqualsTo

fun assertHeightEqualsTo(expectedHeight: Dp): CollectedSizes

assertHeightEqualsTo

fun assertHeightEqualsTo(expectedHeightPx: Density.() -> IntPx): CollectedSizes

assertIsSquareWithSize

fun assertIsSquareWithSize(expectedSize: Dp): CollectedSizes

assertIsSquareWithSize

fun assertIsSquareWithSize(expectedSquarePx: Density.() -> IntPx): CollectedSizes

assertWidthEqualsTo

fun assertWidthEqualsTo(expectedWidth: Dp): CollectedSizes

assertWidthEqualsTo

fun assertWidthEqualsTo(expectedWidthPx: Density.() -> IntPx): CollectedSizes