Add unit tests
This commit is contained in:
parent
ddc47abdde
commit
bbb7f14650
38 changed files with 1040 additions and 515 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue