Skip to content

Commit

Permalink
Run invalidUnicode for js target, introduce additional test for Para…
Browse files Browse the repository at this point in the history
…graph (#981)
  • Loading branch information
Schahen authored Aug 16, 2024
1 parent dc80eb4 commit c479fc9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion skiko/src/commonTest/kotlin/org/jetbrains/skia/ParagraphTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ class ParagraphTest {
}

@Test
@SkipJsTarget // FIXME Emscripten's stringToUTF8 function does not correctly handle invalid unicode symbols.
fun invalidUnicode() = runTest {
val invalidUnicodeText = "🦊qwerty".substring(1)

Expand All @@ -98,6 +97,17 @@ class ParagraphTest {
assertEquals(1, paragraph.lineNumber)
}

@Test
fun emptyString() = runTest {
// https://github.com/JetBrains/skiko/issues/963
val paragraph = ParagraphBuilder(style, fontCollection())
.pushStyle(TextStyle())
.addText("")
.popStyle()
.build()
assertEquals("", paragraph.getText())
}

@Test
fun canCreate() = runTest {
val text = "Hello,\n Пользователь1!"
Expand Down

0 comments on commit c479fc9

Please sign in to comment.