mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-24 04:07:47 +00:00
21 lines
529 B
Swift
21 lines
529 B
Swift
import XCTest
|
|
#if GRDBCIPHER
|
|
@testable import GRDBCipher
|
|
#elseif GRDBCUSTOMSQLITE
|
|
@testable import GRDBCustomSQLite
|
|
#else
|
|
@testable import GRDB
|
|
#endif
|
|
|
|
class DatabaseLogErrorTests: GRDBTestCase {
|
|
|
|
func testErrorLog() throws {
|
|
let dbQueue = try makeDatabaseQueue()
|
|
dbQueue.inDatabase { db in
|
|
_ = try? db.execute("That's not SQL.")
|
|
}
|
|
XCTAssertEqual(lastResultCode!, ResultCode.SQLITE_ERROR)
|
|
XCTAssertEqual(lastMessage!, "near \"That\": syntax error")
|
|
}
|
|
}
|