From 8133d89384ab409c7f010d79849f05d1620f636e Mon Sep 17 00:00:00 2001 From: Ivan Matkov Date: Tue, 17 Sep 2024 14:37:18 +0200 Subject: [PATCH] Add a simple get/set test case --- .../org/jetbrains/skiko/paragraph/TextStyleTest.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/skiko/src/commonTest/kotlin/org/jetbrains/skiko/paragraph/TextStyleTest.kt b/skiko/src/commonTest/kotlin/org/jetbrains/skiko/paragraph/TextStyleTest.kt index 1e78f205f4..31c3e904fa 100644 --- a/skiko/src/commonTest/kotlin/org/jetbrains/skiko/paragraph/TextStyleTest.kt +++ b/skiko/src/commonTest/kotlin/org/jetbrains/skiko/paragraph/TextStyleTest.kt @@ -143,6 +143,15 @@ class TextStyleTest { } } + @Test + fun textStyleTopRatioTest() { + TextStyle().use { textStyle -> + assertEquals(-1f, textStyle.topRatio) + textStyle.topRatio = 0.42f + assertEquals(0.42f, textStyle.topRatio) + } + } + @Test fun textStyleMetricsContainsMeaningfulValues() = runTest { val jbMono = Typeface.makeFromResource(jbMonoPath)