DataLiteCore swift package
This commit is contained in:
parent
b0e52a72b7
commit
6f955b2c43
70 changed files with 7939 additions and 1 deletions
17
Tests/DataLiteCoreTests/Extensions/StringTests.swift
Normal file
17
Tests/DataLiteCoreTests/Extensions/StringTests.swift
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import Testing
|
||||
import Foundation
|
||||
import DataLiteCore
|
||||
|
||||
struct StringTests {
|
||||
@Test func testStringToSQLiteRawValue() {
|
||||
#expect("Hello, SQLite!".sqliteRawValue == .text("Hello, SQLite!"))
|
||||
}
|
||||
|
||||
@Test func testSQLiteRawValueToString() {
|
||||
#expect(String(SQLiteRawValue.text("Hello, SQLite!")) == "Hello, SQLite!")
|
||||
|
||||
#expect(String(SQLiteRawValue.int(42)) == nil)
|
||||
#expect(String(SQLiteRawValue.blob(Data([0x01, 0x02]))) == nil)
|
||||
#expect(String(SQLiteRawValue.null) == nil)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue