Add unit tests

This commit is contained in:
2025-10-25 18:56:55 +03:00
parent ddc47abdde
commit bbb7f14650
38 changed files with 1051 additions and 526 deletions

View File

@@ -2,18 +2,18 @@ import Testing
@testable import DataLiteCore
struct ConnectionLocationTests {
@Test func testFileLocationPath() {
@Test func fileLocationPath() {
let filePath = "/path/to/database.db"
let location = Connection.Location.file(path: filePath)
#expect(location.path == filePath)
}
@Test func testInMemoryLocationPath() {
@Test func inMemoryLocationPath() {
let inMemoryLocation = Connection.Location.inMemory
#expect(inMemoryLocation.path == ":memory:")
}
@Test func testTemporaryLocationPath() {
@Test func temporaryLocationPath() {
let temporaryLocation = Connection.Location.temporary
#expect(temporaryLocation.path == "")
}