Skip to content

Commit

Permalink
feat: working tests
Browse files Browse the repository at this point in the history
Signed-off-by: KolbyRKunz <[email protected]>
  • Loading branch information
KolbyRKunz committed Oct 30, 2023
1 parent a7307d8 commit 829458f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ class AskarEntry(
UniFFILib.uniffi_aries_askar_fn_method_askarentry_tags(it, _status)
}
}.let {
for( i in 0 until it.dataSize) {
}
FfiConverterMapStringString.lift(it)
}

Expand Down
6 changes: 3 additions & 3 deletions wrappers/kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ kotlin {
jvm{
compilations.all{
kotlinOptions.jvmTarget = "1.8"
// this.kotlinOptions {
// freeCompilerArgs += listOf("-Xdebug")
// }
this.kotlinOptions {
freeCompilerArgs += listOf("-Xdebug")
}
}
testRuns["test"].executionTask.configure{
useJUnitPlatform()
Expand Down
6 changes: 4 additions & 2 deletions wrappers/kotlin/src/commonTest/kotlin/AskarTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import askar.store.Store
import askar.toUbyteList
import kotlinx.coroutines.runBlocking
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.*
import kotlin.test.*
import kotlin.test.Test

Expand Down Expand Up @@ -242,7 +242,9 @@ class AskarTest {
tags = Json.encodeToString(firstEntry.tags)
)

assertEquals(1, txn.count(firstEntry.category, Json.encodeToString(firstEntry.tags)))
val count = txn.count(firstEntry.category, Json.encodeToString(firstEntry.tags))

assertEquals(1, count)

val ret = txn.fetch(firstEntry.category, firstEntry.name) ?: throw Error("should not happen")

Expand Down

0 comments on commit 829458f

Please sign in to comment.