Skip to content

Commit 043137e

Browse files
committed
Coverage improvements
Because "age" is already an Expression<Int?>, many test paths weren't being hit. Signed-off-by: Stephen Celis <stephen@stephencelis.com>
1 parent 89d1619 commit 043137e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

SQLite Tests/ExpressionTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ class ExpressionTests: SQLiteTestCase {
454454
}
455455

456456
let email2 = Expression<String?>("email")
457-
let age2 = Expression<Int?>("age")
457+
let age2 = Expression<Int>("age")
458458
let salary2 = Expression<Double?>("salary")
459459
let admin2 = Expression<Bool?>("admin")
460460

SQLite Tests/FTSTests.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ class FTSTests: SQLiteTestCase {
1414
AssertSQL("CREATE VIRTUAL TABLE \"emails\" USING fts4(\"subject\", \"body\")")
1515
}
1616

17+
func test_createVtable_usingFts4_withSimpleTokenizer_createsVirtualTableWithTokenizer() {
18+
db.create(vtable: emails, using: fts4([subject, body], tokenize: .Simple))
19+
20+
AssertSQL("CREATE VIRTUAL TABLE \"emails\" USING fts4(\"subject\", \"body\", tokenize=simple)")
21+
}
22+
1723
func test_createVtable_usingFts4_withPorterTokenizer_createsVirtualTableWithTokenizer() {
1824
db.create(vtable: emails, using: fts4([subject, body], tokenize: .Porter))
1925

0 commit comments

Comments
 (0)