Add unit tests
This commit is contained in:
@@ -3,15 +3,16 @@ import Foundation
|
||||
import DataLiteCore
|
||||
|
||||
struct StringTests {
|
||||
@Test func testStringToSQLiteRawValue() {
|
||||
@Test func stringToSQLiteValue() {
|
||||
#expect("Hello, SQLite!".sqliteValue == .text("Hello, SQLite!"))
|
||||
}
|
||||
|
||||
@Test func testSQLiteRawValueToString() {
|
||||
@Test func stringFromSQLiteValue() {
|
||||
#expect(String(SQLiteValue.text("Hello, SQLite!")) == "Hello, SQLite!")
|
||||
|
||||
#expect(String(SQLiteValue.int(42)) == nil)
|
||||
#expect(String(SQLiteValue.blob(Data([0x01, 0x02]))) == nil)
|
||||
#expect(String(SQLiteValue.real(42)) == nil)
|
||||
#expect(String(SQLiteValue.blob(Data([0x42]))) == nil)
|
||||
#expect(String(SQLiteValue.null) == nil)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user