Skip to content

Commit

Permalink
Update Kotlin to 1.9.24 and Compose to 1.6.10 (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedRejeb authored May 23, 2024
1 parent b3f3544 commit d610843
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 16 deletions.
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
agp = "8.2.2"
kotlin = "1.9.23"
compose = "1.6.2"
kotlin = "1.9.24"
compose = "1.6.10"
dokka = "1.9.10"

ksoup = "0.3.2"
Expand All @@ -10,7 +10,7 @@ jetbrainsMarkdown = "0.7.0"
nexus-publish = "2.0.0-rc-1"

# For sample
compose-compiler = "1.5.4"
compose-compiler = "1.5.14"
activity-compose = "1.9.0"
voyager = "1.1.0-alpha04"
richeditor = "1.0.0-rc04"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import androidx.compose.ui.text.style.TextAlign
import com.mohamedrejeb.richeditor.annotation.ExperimentalRichTextApi
import com.mohamedrejeb.richeditor.paragraph.RichParagraph
import com.mohamedrejeb.richeditor.paragraph.type.DefaultParagraph
import com.mohamedrejeb.richeditor.paragraph.type.ParagraphType
import com.mohamedrejeb.richeditor.paragraph.type.UnorderedList
import kotlin.test.Test
import kotlin.test.assertEquals
Expand Down Expand Up @@ -255,7 +254,7 @@ class RichTextStateTest {
}

@Test
fun testGetSpanStyleByTextRange() {
fun testGetSpanStyle() {
val richTextState = RichTextState(
initialRichParagraphList = listOf(
RichParagraph(
Expand All @@ -282,17 +281,17 @@ class RichTextStateTest {
// Get the style by text range
assertEquals(
SpanStyle(fontWeight = FontWeight.Bold),
richTextState.getSpanStyleByTextRange(TextRange(0, 4)),
richTextState.getSpanStyle(TextRange(0, 4)),
)

assertEquals(
SpanStyle(),
richTextState.getSpanStyleByTextRange(TextRange(9, 19)),
richTextState.getSpanStyle(TextRange(9, 19)),
)
}

@Test
fun testGetRichSpanStyleByTextRange() {
fun testGetRichSpanStyle() {
val richTextState = RichTextState(
initialRichParagraphList = listOf(
RichParagraph(
Expand All @@ -319,17 +318,17 @@ class RichTextStateTest {
// Get the style by text range
assertEquals(
RichSpanStyle.Code(),
richTextState.getRichSpanStyleByTextRange(TextRange(0, 4)),
richTextState.getRichSpanStyle(TextRange(0, 4)),
)

assertEquals(
RichSpanStyle.Default,
richTextState.getRichSpanStyleByTextRange(TextRange(9, 19)),
richTextState.getRichSpanStyle(TextRange(9, 19)),
)
}

@Test
fun testGetParagraphStyleByTextRange() {
fun testGetParagraphStyle() {
val richTextState = RichTextState(
initialRichParagraphList = listOf(
RichParagraph(
Expand Down Expand Up @@ -363,17 +362,17 @@ class RichTextStateTest {
ParagraphStyle(
textAlign = TextAlign.Center,
),
richTextState.getParagraphStyleByTextRange(TextRange(0, 4)),
richTextState.getParagraphStyle(TextRange(0, 4)),
)

assertEquals(
ParagraphStyle(),
richTextState.getParagraphStyleByTextRange(TextRange(19, 21)),
richTextState.getParagraphStyle(TextRange(19, 21)),
)
}

@Test
fun testGetParagraphTypeByTextRange() {
fun testGetParagraphType() {
val richTextState = RichTextState(
initialRichParagraphList = listOf(
RichParagraph(
Expand Down Expand Up @@ -403,12 +402,12 @@ class RichTextStateTest {
// Get the style by text range
assertEquals(
UnorderedList::class,
richTextState.getParagraphTypeByTextRange(TextRange(0, 4))::class,
richTextState.getParagraphType(TextRange(0, 4))::class,
)

assertEquals(
DefaultParagraph::class,
richTextState.getParagraphTypeByTextRange(TextRange(19, 21))::class,
richTextState.getParagraphType(TextRange(19, 21))::class,
)
}

Expand Down

0 comments on commit d610843

Please sign in to comment.