-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraalvmBaseSqliteDriverTest.kt
More file actions
40 lines (34 loc) · 1.5 KB
/
GraalvmBaseSqliteDriverTest.kt
File metadata and controls
40 lines (34 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Copyright 2024, the wasm-sqlite-open-helper project authors and contributors. Please see the AUTHORS file
* for details. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
* SPDX-License-Identifier: Apache-2.0
*/
package ru.pixnews.wasm.sqlite.driver.graalvm
import org.junit.Rule
import org.junit.experimental.runners.Enclosed
import org.junit.rules.TemporaryFolder
import org.junit.runner.RunWith
import ru.pixnews.wasm.sqlite.binary.SqliteAndroidWasmEmscriptenIcu348
import ru.pixnews.wasm.sqlite.driver.WasmSQLiteDriver
import ru.pixnews.wasm.sqlite.driver.test.base.tests.AbstractBasicSqliteDriverTest
@RunWith(Enclosed::class)
class GraalvmBaseSqliteDriverTest {
class MultiThreadedSqliteTest : AbstractBasicSqliteDriverTest<WasmSQLiteDriver<*>>(
driverCreator = GraalvmSqliteDriverFactory(),
) {
@JvmField
@Rule
val tempFolder: TemporaryFolder = TemporaryFolder()
override fun fileInTempDir(databaseName: String): String = tempFolder.root.resolve(databaseName).path
}
class SingleThreadedSqliteTest : AbstractBasicSqliteDriverTest<WasmSQLiteDriver<*>>(
driverCreator = GraalvmSqliteDriverFactory(
defaultSqliteBinary = SqliteAndroidWasmEmscriptenIcu348,
),
) {
@JvmField
@Rule
val tempFolder: TemporaryFolder = TemporaryFolder()
override fun fileInTempDir(databaseName: String): String = tempFolder.root.resolve(databaseName).path
}
}