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")
    }
}

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("Abracadabra")
        }
        XCTAssertEqual(lastResultCode!, ResultCode.SQLITE_ERROR)
        // Don't check for exact error message because it depends on SQLite version
        XCTAssert(lastMessage!.contains("syntax error"))
        XCTAssert(lastMessage!.contains("Abracadabra"))
    }
}

Fix a test for syntax error that fails with SQLite 3.25.2
Fix a test for syntax error that fails with SQLite 3.25.2
