mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-24 04:07:47 +00:00
Conflicts: GRDB/Core/Database.swift GRDB/FetchRequest/QueryInterfaceRequest.swift GRDB/FetchRequest/SQLCollation.swift GRDB/FetchRequest/SQLFunction.swift GRDB/FetchRequest/SQLOperator.swift GRDB/FetchRequest/SQLSelectQuery.swift README.md
28 lines
757 B
Swift
28 lines
757 B
Swift
import XCTest
|
|
#if USING_SQLCIPHER
|
|
import GRDBCipher
|
|
#elseif USING_CUSTOMSQLITE
|
|
import GRDBCustomSQLite
|
|
#else
|
|
import GRDB
|
|
#endif
|
|
|
|
class DatabasePoolCrashTests: GRDBCrashTestCase {
|
|
|
|
func testReaderCanNotStartTransaction() {
|
|
assertCrash("DatabasePool readers can not start transactions or savepoints.") {
|
|
try dbPool.read { db in
|
|
let statement = try db.makeUpdateStatement("BEGIN TRANSACTION")
|
|
}
|
|
}
|
|
}
|
|
|
|
func testReaderCanNotStartSavepoint() {
|
|
assertCrash("DatabasePool readers can not start transactions or savepoints.") {
|
|
try dbPool.read { db in
|
|
let statement = try db.makeUpdateStatement("SAVEPOINT foo")
|
|
}
|
|
}
|
|
}
|
|
}
|