Skip to content

Commit

Permalink
Bump deps (#563)
Browse files Browse the repository at this point in the history
* Bump kotlinx-json from 1.6.0 to 1.6.1

Bumps `kotlinx-json` from 1.6.0 to 1.6.1.

Updates `org.jetbrains.kotlinx:kotlinx-serialization-json` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](Kotlin/kotlinx.serialization@v1.6.0...v1.6.1)

Updates `org.jetbrains.kotlinx:kotlinx-serialization-hocon` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](Kotlin/kotlinx.serialization@v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-json
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-hocon
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump kotlin from 1.9.10 to 1.9.20

Bumps `kotlin` from 1.9.10 to 1.9.20.

Updates `org.jetbrains.kotlin.multiplatform` from 1.9.10 to 1.9.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](JetBrains/kotlin@v1.9.10...v1.9.20)

Updates `org.jetbrains.kotlin.jvm` from 1.9.10 to 1.9.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](JetBrains/kotlin@v1.9.10...v1.9.20)

Updates `org.jetbrains.kotlin.js` from 1.9.10 to 1.9.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](JetBrains/kotlin@v1.9.10...v1.9.20)

Updates `org.jetbrains.kotlin.plugin.serialization` from 1.9.10 to 1.9.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](JetBrains/kotlin@v1.9.10...v1.9.20)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin.multiplatform
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin.jvm
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin.js
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin.plugin.serialization
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump app.softwork:kotlinx-uuid-core from 0.0.21 to 0.0.22

Bumps [app.softwork:kotlinx-uuid-core](https://github.com/hfhbd/kotlinx-uuid) from 0.0.21 to 0.0.22.
- [Release notes](https://github.com/hfhbd/kotlinx-uuid/releases)
- [Commits](hfhbd/kotlinx-uuid@v0.0.21...v0.0.22)

---
updated-dependencies:
- dependency-name: app.softwork:kotlinx-uuid-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Migrates some kotest to kotlin.test

* Bump org.postgresql:postgresql from 42.6.0 to 42.7.0

Bumps [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) from 42.6.0 to 42.7.0.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](pgjdbc/pgjdbc@REL42.6.0...REL42.7.0)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump com.fasterxml.jackson.core:jackson-databind from 2.15.3 to 2.16.0

Bumps [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson) from 2.15.3 to 2.16.0.
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
fedefernandez and dependabot[bot] authored Nov 28, 2023
1 parent 0db20cf commit 0c29b52
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 deletions.
11 changes: 5 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
arrow = "1.2.1"
arrowGradle = "0.12.0-rc.6"
exposed = "0.44.1"
kotlin = "1.9.10"
kotlinx-json = "1.6.0"
kotlin = "1.9.20"
kotlinx-json = "1.6.1"
kotlinx-datetime = "0.4.1"
ktor = "2.3.6"
spotless = "6.22.0"
Expand All @@ -12,8 +12,8 @@ kotest = "5.8.0"
kotest-testcontainers = "2.0.2"
kotest-arrow = "1.4.0"
klogging = "5.1.0"
uuid = "0.0.21"
postgresql = "42.6.0"
uuid = "0.0.22"
postgresql = "42.7.0"
testcontainers = "1.19.1"
hikari = "5.0.1"
dokka = "1.9.10"
Expand All @@ -27,7 +27,7 @@ pdfbox = "3.0.0"
mysql = "8.0.33"
semverGradle = "0.5.0-rc.5"
openai-client-version = "3.5.1"
jackson = "2.15.3"
jackson = "2.16.0"
jsonschema = "4.32.0"
jakarta = "3.0.2"
suspend-transform = "0.5.1"
Expand Down Expand Up @@ -83,7 +83,6 @@ kotest-framework = { module = "io.kotest:kotest-framework-engine", version.ref =
kotest-property = { module = "io.kotest:kotest-property", version.ref = "kotest" }
kotest-junit5 = { module = "io.kotest:kotest-runner-junit5", version.ref = "kotest" }
kotest-testcontainers = { module = "io.kotest.extensions:kotest-extensions-testcontainers", version.ref = "kotest-testcontainers" }
kotest-assertions-arrow = { module = "io.kotest.extensions:kotest-assertions-arrow", version.ref = "kotest-arrow" }
ktor-serialization-json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" }
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" }
Expand Down
3 changes: 0 additions & 3 deletions tokenizer/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotest.multiplatform)
alias(libs.plugins.spotless)
alias(libs.plugins.arrow.gradle.publish)
alias(libs.plugins.semver.gradle)
Expand Down Expand Up @@ -41,12 +40,10 @@ kotlin {
dependencies {
implementation(kotlin("test"))
implementation(libs.kotest.property)
implementation(libs.kotest.framework)
implementation(libs.kotest.assertions)
implementation("com.goncalossilva:resources:0.3.2")
}
}
val jvmTest by getting { dependencies { implementation(libs.kotest.junit5) } }
js {
nodejs { testTask { useMocha { timeout = "10000" } } }
browser { testTask { useMocha { timeout = "10000" } } }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
package com.xebia.functional.tokenizer

import io.kotest.assertions.throwables.shouldThrow
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.shouldBe
import io.kotest.matchers.shouldNotBe
import kotlin.test.Test

class ImmutableByteArrayTest : StringSpec({
"can be used as key in map" {
class ImmutableByteArrayTest {
@Test
fun canBeUsedAsKeyInMap() {
val key1 = ImmutableByteArray.from("1, 2, 3")
val key2 = ImmutableByteArray.from("1, 2, 3")

key1 shouldBe key2
key1.hashCode() shouldBe key2.hashCode()
}

"cannot be mutated when using ByteArray constructor" {

@Test
fun cannotBeMutatedWhenUsingByteArrayConstructor() {
val bytes = byteArrayOf(1, 2, 3)
val byteArray = ImmutableByteArray.from(bytes)

Expand All @@ -24,7 +27,8 @@ class ImmutableByteArrayTest : StringSpec({
byteArray shouldBe ImmutableByteArray.from(byteArrayOf(1, 2, 3))
}

"cannot be mutated when using rawArray" {
@Test
fun cannotBeMutatedWhenUsingRawArray() {
val byteArray = ImmutableByteArray.from("1, 2, 3")
val bytes = byteArray.rawArray

Expand All @@ -34,35 +38,40 @@ class ImmutableByteArrayTest : StringSpec({
byteArray shouldBe ImmutableByteArray.from("1, 2, 3")
}

"getLength is correct" {
@Test
fun getLengthIsCorrect() {
val byteArray = ImmutableByteArray.from("1, 2, 3")

byteArray.size shouldBe 7
}

"getBytesBetween returns correct slice of array" {
@Test
fun getBytesBetweenReturnsCorrectSliceOfArray() {
val byteArray = ImmutableByteArray.from(byteArrayOf(1, 2, 3, 4, 5, 6))

byteArray.getBytesBetween(3, 6) shouldBe ImmutableByteArray.from(byteArrayOf(4, 5, 6))
}

"getBytesBetween throws when inclusive startIndex is out of bounds" {
@Test
fun getBytesBetweenThrowsWhenInclusiveStartIndexIsOutOfBounds() {
val byteArray = ImmutableByteArray.from(byteArrayOf(1, 2, 3, 4, 5, 6))

shouldThrow<IndexOutOfBoundsException> { byteArray.getBytesBetween(-1, 6) }
shouldThrow<IndexOutOfBoundsException> { byteArray.getBytesBetween(9, 10) }
}

"getBytesBetween throws when exclusive endIndex is out of bounds" {
@Test
fun getBytesBetweenThrowsWhenExclusiveEndIndexIsOutOfBounds() {
val byteArray = ImmutableByteArray.from(byteArrayOf(1, 2, 3, 4, 5, 6))

shouldThrow<IndexOutOfBoundsException> { byteArray.getBytesBetween(0, 7) }
shouldThrow<IndexOutOfBoundsException> { byteArray.getBytesBetween(0, -1) }
}

"getBytesBetween throws when startIndex is greater than endIndex" {
@Test
fun getBytesBetweenThrowsWhenStartIndexIsGreaterThanEndIndex() {
val byteArray = ImmutableByteArray.from(byteArrayOf(1, 2, 3, 4, 5, 6))

shouldThrow<IllegalArgumentException> { byteArray.getBytesBetween(3, 2) }
}
})
}

0 comments on commit 0c29b52

Please sign in to comment.