Skip to content

Commit 4e4c5c0

Browse files
authored
Replace CValue<CGRect>.useContents { toDpRect() } (#3031)
1 parent 0197afb commit 4e4c5c0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

compose/ui/ui/src/uikitInstrumentedTest/kotlin/androidx/compose/ui/interop/UIKitInteropUILabelSizingTest.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class UIKitInteropUILabelSizingTest {
6969
UILabel().apply {
7070
numberOfLines = 1
7171
text = SHORT_TEXT
72-
uiLabelRect = { frame.useContents { toDpRect() } }
72+
uiLabelRect = { frame.toDpRect() }
7373
}
7474
},
7575
modifier = Modifier.onGloballyPositioned { interopRect = it.boundsInRoot().toDpRect(density) },
@@ -92,7 +92,7 @@ class UIKitInteropUILabelSizingTest {
9292
UILabel().apply {
9393
numberOfLines = 0
9494
text = SHORT_TEXT
95-
uiLabelRect = { frame.useContents { toDpRect() } }
95+
uiLabelRect = { frame.toDpRect() }
9696
}
9797
},
9898
modifier = Modifier.onGloballyPositioned { interopRect = it.boundsInRoot().toDpRect(density) },
@@ -115,7 +115,7 @@ class UIKitInteropUILabelSizingTest {
115115
UILabel().apply {
116116
numberOfLines = 1
117117
text = LONG_TEXT
118-
uiLabelRect = { frame.useContents { toDpRect() } }
118+
uiLabelRect = { frame.toDpRect() }
119119
}
120120
},
121121
modifier = Modifier.onGloballyPositioned { interopRect = it.boundsInRoot().toDpRect(density) },
@@ -138,7 +138,7 @@ class UIKitInteropUILabelSizingTest {
138138
UILabel().apply {
139139
numberOfLines = 0
140140
text = LONG_TEXT
141-
uiLabelRect = { frame.useContents { toDpRect() } }
141+
uiLabelRect = { frame.toDpRect() }
142142
}
143143
},
144144
modifier = Modifier.onGloballyPositioned { interopRect = it.boundsInRoot().toDpRect(density) },
@@ -492,7 +492,7 @@ class UIKitInteropUILabelSizingTest {
492492
}
493493
}
494494

495-
assertEquals(composeRect, uiKitView.frame.useContents { toDpRect() })
495+
assertEquals(composeRect, uiKitView.frame.toDpRect())
496496
}
497497

498498
@Test

0 commit comments

Comments
 (0)