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
25 lines
643 B
Swift
25 lines
643 B
Swift
import XCTest
|
|
#if USING_SQLCIPHER
|
|
import GRDBCipher
|
|
#elseif USING_CUSTOMSQLITE
|
|
import GRDBCustomSQLite
|
|
#else
|
|
import GRDB
|
|
#endif
|
|
|
|
class InMemoryDatabaseTests : GRDBTestCase
|
|
{
|
|
func testInMemoryDatabase() {
|
|
assertNoError {
|
|
let dbQueue = DatabaseQueue()
|
|
try dbQueue.inTransaction { db in
|
|
try db.execute("CREATE TABLE foo (bar TEXT)")
|
|
try db.execute("INSERT INTO foo (bar) VALUES ('baz')")
|
|
let baz = String.fetchOne(db, "SELECT bar FROM foo")!
|
|
XCTAssertEqual(baz, "baz")
|
|
return .rollback
|
|
}
|
|
}
|
|
}
|
|
}
|