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 BoolTests {
@Test func testBoolToSQLiteRawValue() {
#expect(true.sqliteRawValue == .int(1))
#expect(false.sqliteRawValue == .int(0))
}
@Test func testSQLiteRawValueToBool() {
#expect(Bool(.int(1)) == true)
#expect(Bool(.int(0)) == false)
#expect(Bool(.int(-1)) == nil)
#expect(Bool(.int(2)) == nil)
#expect(Bool(.real(1.0)) == nil)
#expect(Bool(.text("true")) == nil)
#expect(Bool(.blob(Data())) == nil)
#expect(Bool(.null) == nil)
}
}