Searched refs:dp (Results 1 – 6 of 6) sorted by relevance
/platform_testing/libraries/motion/compose/tests/src/platform/test/motion/compose/ |
D | DataPointTypesTest.kt | 23 import androidx.compose.ui.unit.dp 29 import platform.test.motion.compose.DataPointTypes.dp 41 assertThat(dp.fromJson(1)).isEqualTo(1.dp.asDataPoint()) in dp_jsonConversion() 42 assertThat(1.dp.asDataPoint().asJson()).isEqualTo(1) in dp_jsonConversion() 43 assertThat(dp).invalidJsonReturnsUnknownDataPoint(JSONObject(), "foo") in dp_jsonConversion() 56 .convertsJsonObject(DpSize(width = 1.dp, height = 2.dp), """{"width":1, "height": 2}""") in dpSize_jsonConversion() 62 assertThat(dpOffset).convertsJsonObject(DpOffset(x = 1.dp, y = 2.dp), """{"x":1, "y": 2}""") in dpOffset_jsonConversion()
|
D | ComposeFeatureCapturesTest.kt | 30 import androidx.compose.ui.unit.dp 56 composeRule.setContent { Box(Modifier.testTag("box").size(width = 10.dp, height = 20.dp)) } in dpSize_capturesDataPoint() 60 .hasNativeValue(DpSize(10.dp, 20.dp)) in dpSize_capturesDataPoint() 65 composeRule.setContent { Box(Modifier.testTag("box").size(width = 10.dp, height = 20.dp)) } in size_capturesDataPoint() 75 Box(Modifier.offset(x = 10.dp, y = 20.dp)) { in positionInRoot_capturesDataPoint() 76 Box(Modifier.offset(x = 1.dp, y = 2.dp).testTag("box")) in positionInRoot_capturesDataPoint() 82 .hasNativeValue(DpOffset(11.dp, 22.dp)) in positionInRoot_capturesDataPoint()
|
D | MotionTestValuesTest.kt | 26 import androidx.compose.ui.unit.dp 100 content = { Box(Modifier.size(10.dp).motionTestValues { .5f exportAs foo }) }, in featureWithDataPointType_defaultMatcherAndName() 114 Modifier.size(10.dp).testTag("foo").motionTestValues { in featureWithDataPointType_matchingViaTestTag() 130 content = { Box(Modifier.size(10.dp).motionTestValues { .5f exportAs foo }) }, in featureWithDataPointType_unknownNode() 144 content = { Box(Modifier.size(10.dp).motionTestValues { .5f exportAs foo }) }, in featureWithDataPointType_withCustomName() 156 content = { Box(Modifier.size(10.dp).motionTestValues { .5f exportAs foo }) }, in featureWithFeatureCapture_defaultMatcherAndName() 170 Modifier.size(10.dp).testTag("foo").motionTestValues { in featureWithFeatureCapture_matchingViaTestTag() 186 content = { Box(Modifier.size(10.dp).motionTestValues { .5f exportAs foo }) }, in featureWithFeatureCapture_unknownNode() 198 content = { Box(Modifier.size(10.dp).motionTestValues { .5f exportAs foo }) }, in featureWithFeatureCapture_withCustomName()
|
D | ComposeToolkitTest.kt | 54 import androidx.compose.ui.unit.dp in <lambda>() 85 animateDpAsState(if (play) 90.dp else 0.dp) { completed = true } in <lambda>() 90 .size(10.dp) in <lambda>() 114 .width(if (play) 90.dp else 10.dp) in <lambda>() 115 .height(10.dp) in <lambda>() 140 .size(10.dp) in <lambda>() 169 .size(10.dp) in <lambda>() 178 .size(10.dp) in <lambda>() 203 val animatedSize by animateDpAsState(targetValue = 20.dp * (clickCount + 1)) in <lambda>() 209 .height(20.dp) in <lambda>() [all …]
|
/platform_testing/libraries/motion/compose/src/platform/test/motion/compose/ |
D | DataPointTypes.kt | 26 import androidx.compose.ui.unit.dp 32 fun Dp.asDataPoint() = DataPointTypes.dp.makeDataPoint(this) in Dp() 44 val dp: DataPointType<Dp> = in Dp() constant 49 is Float -> it.dp in Dp() 50 is Number -> it.toFloat().dp in Dp() 51 is String -> it.toFloatOrNull()?.dp ?: throw UnknownTypeException() in Dp() 79 DpSize(getDouble("width").dp, getDouble("height").dp) in Dp() 95 DpOffset(getDouble("x").dp, getDouble("y").dp) in Dp()
|
/platform_testing/libraries/flicker/utils/src/android/tools/traces/wm/ |
D | WindowManagerState.kt | 468 fun dpToPx(dp: Float, densityDpi: Int): Int { in <lambda>() 469 return (dp * densityDpi / PlatformConsts.DENSITY_DEFAULT + 0.5f).toInt() in <lambda>()
|