DataLiteCore swift package

This commit is contained in:
2025-04-24 23:48:46 +03:00
parent b0e52a72b7
commit 6f955b2c43
70 changed files with 7939 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
import Testing
import Foundation
import DataLiteCore
struct DataSQLiteRawRepresentableTests {
@Test func testDataToSQLiteRawValue() {
let data = Data([0x01, 0x02, 0x03])
#expect(data.sqliteRawValue == .blob(data))
}
@Test func testSQLiteRawValueToData() {
let data = Data([0x01, 0x02, 0x03])
let rawValue = SQLiteRawValue.blob(data)
#expect(Data(rawValue) == data)
#expect(Data(.int(1)) == nil)
#expect(Data(.real(1.0)) == nil)
#expect(Data(.text("blob")) == nil)
#expect(Data(.null) == nil)
}
}