Add unit tests
This commit is contained in:
@@ -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 == "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user