mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-24 04:07:47 +00:00
Fix tests for Xcode 14.0
This commit is contained in:
1 parent
c4c0b1ce90
commit
e129df15db
1 file changed
+39
@@ -28,7 +28,10 @@ class DatabaseReaderTests : GRDBTestCase {
|
||||
try test(setup(makeDatabaseQueue()))
|
||||
try test(setup(makeDatabasePool()))
|
||||
try test(setup(makeDatabasePool()).makeSnapshot())
|
||||
#if (compiler(<5.7.1) && (os(macOS) || targetEnvironment(macCatalyst))) || GRDBCIPHER || (GRDBCUSTOMSQLITE && !SQLITE_ENABLE_SNAPSHOT)
|
||||
#else
|
||||
try test(setup(makeDatabasePool()).makeSnapshotPool())
|
||||
#endif
|
||||
}
|
||||
|
||||
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
|
||||
@@ -49,7 +52,10 @@ class DatabaseReaderTests : GRDBTestCase {
|
||||
try await test(setup(makeDatabaseQueue()))
|
||||
try await test(setup(makeDatabasePool()))
|
||||
try await test(setup(makeDatabasePool()).makeSnapshot())
|
||||
#if (compiler(<5.7.1) && (os(macOS) || targetEnvironment(macCatalyst))) || GRDBCIPHER || (GRDBCUSTOMSQLITE && !SQLITE_ENABLE_SNAPSHOT)
|
||||
#else
|
||||
try await test(setup(makeDatabasePool()).makeSnapshotPool())
|
||||
#endif
|
||||
}
|
||||
|
||||
func testReadPreventsDatabaseModification() throws {
|
||||
@@ -66,7 +72,10 @@ class DatabaseReaderTests : GRDBTestCase {
|
||||
try test(makeDatabaseQueue())
|
||||
try test(makeDatabasePool())
|
||||
try test(makeDatabasePool().makeSnapshot())
|
||||
#if (compiler(<5.7.1) && (os(macOS) || targetEnvironment(macCatalyst))) || GRDBCIPHER || (GRDBCUSTOMSQLITE && !SQLITE_ENABLE_SNAPSHOT)
|
||||
#else
|
||||
try test(makeDatabasePool().makeSnapshotPool())
|
||||
#endif
|
||||
}
|
||||
|
||||
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
|
||||
@@ -84,7 +93,10 @@ class DatabaseReaderTests : GRDBTestCase {
|
||||
try await test(makeDatabaseQueue())
|
||||
try await test(makeDatabasePool())
|
||||
try await test(makeDatabasePool().makeSnapshot())
|
||||
#if (compiler(<5.7.1) && (os(macOS) || targetEnvironment(macCatalyst))) || GRDBCIPHER || (GRDBCUSTOMSQLITE && !SQLITE_ENABLE_SNAPSHOT)
|
||||
#else
|
||||
try await test(makeDatabasePool().makeSnapshotPool())
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - UnsafeRead
|
||||
@@ -106,7 +118,10 @@ class DatabaseReaderTests : GRDBTestCase {
|
||||
try test(setup(makeDatabaseQueue()))
|
||||
try test(setup(makeDatabasePool()))
|
||||
try test(setup(makeDatabasePool()).makeSnapshot())
|
||||
#if (compiler(<5.7.1) && (os(macOS) || targetEnvironment(macCatalyst))) || GRDBCIPHER || (GRDBCUSTOMSQLITE && !SQLITE_ENABLE_SNAPSHOT)
|
||||
#else
|
||||
try test(setup(makeDatabasePool()).makeSnapshotPool())
|
||||
#endif
|
||||
}
|
||||
|
||||
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
|
||||
@@ -127,7 +142,10 @@ class DatabaseReaderTests : GRDBTestCase {
|
||||
try await test(setup(makeDatabaseQueue()))
|
||||
try await test(setup(makeDatabasePool()))
|
||||
try await test(setup(makeDatabasePool()).makeSnapshot())
|
||||
#if (compiler(<5.7.1) && (os(macOS) || targetEnvironment(macCatalyst))) || GRDBCIPHER || (GRDBCUSTOMSQLITE && !SQLITE_ENABLE_SNAPSHOT)
|
||||
#else
|
||||
try await test(setup(makeDatabasePool()).makeSnapshotPool())
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - UnsafeReentrantRead
|
||||
@@ -149,7 +167,10 @@ class DatabaseReaderTests : GRDBTestCase {
|
||||
try test(setup(makeDatabaseQueue()))
|
||||
try test(setup(makeDatabasePool()))
|
||||
try test(setup(makeDatabasePool()).makeSnapshot())
|
||||
#if (compiler(<5.7.1) && (os(macOS) || targetEnvironment(macCatalyst))) || GRDBCIPHER || (GRDBCUSTOMSQLITE && !SQLITE_ENABLE_SNAPSHOT)
|
||||
#else
|
||||
try test(setup(makeDatabasePool()).makeSnapshotPool())
|
||||
#endif
|
||||
}
|
||||
|
||||
func testUnsafeReentrantReadIsReentrant() throws {
|
||||
@@ -167,7 +188,10 @@ class DatabaseReaderTests : GRDBTestCase {
|
||||
try test(makeDatabaseQueue())
|
||||
try test(makeDatabasePool())
|
||||
try test(makeDatabasePool().makeSnapshot())
|
||||
#if (compiler(<5.7.1) && (os(macOS) || targetEnvironment(macCatalyst))) || GRDBCIPHER || (GRDBCUSTOMSQLITE && !SQLITE_ENABLE_SNAPSHOT)
|
||||
#else
|
||||
try test(makeDatabasePool().makeSnapshotPool())
|
||||
#endif
|
||||
}
|
||||
|
||||
func testUnsafeReentrantReadIsReentrantFromWrite() throws {
|
||||
@@ -212,7 +236,10 @@ class DatabaseReaderTests : GRDBTestCase {
|
||||
try test(makeDatabaseQueue())
|
||||
try test(makeDatabasePool())
|
||||
try test(makeDatabasePool().makeSnapshot())
|
||||
#if (compiler(<5.7.1) && (os(macOS) || targetEnvironment(macCatalyst))) || GRDBCIPHER || (GRDBCUSTOMSQLITE && !SQLITE_ENABLE_SNAPSHOT)
|
||||
#else
|
||||
try test(makeDatabasePool().makeSnapshotPool())
|
||||
#endif
|
||||
}
|
||||
|
||||
func testAsyncReadPreventsDatabaseModification() throws {
|
||||
@@ -239,7 +266,10 @@ class DatabaseReaderTests : GRDBTestCase {
|
||||
try test(makeDatabaseQueue())
|
||||
try test(makeDatabasePool())
|
||||
try test(makeDatabasePool().makeSnapshot())
|
||||
#if (compiler(<5.7.1) && (os(macOS) || targetEnvironment(macCatalyst))) || GRDBCIPHER || (GRDBCUSTOMSQLITE && !SQLITE_ENABLE_SNAPSHOT)
|
||||
#else
|
||||
try test(makeDatabasePool().makeSnapshotPool())
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - Function
|
||||
@@ -257,7 +287,10 @@ class DatabaseReaderTests : GRDBTestCase {
|
||||
try test(makeDatabaseQueue())
|
||||
try test(makeDatabasePool())
|
||||
try test(makeDatabasePool().makeSnapshot())
|
||||
#if (compiler(<5.7.1) && (os(macOS) || targetEnvironment(macCatalyst))) || GRDBCIPHER || (GRDBCUSTOMSQLITE && !SQLITE_ENABLE_SNAPSHOT)
|
||||
#else
|
||||
try test(makeDatabasePool().makeSnapshotPool())
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - Collation
|
||||
@@ -275,7 +308,10 @@ class DatabaseReaderTests : GRDBTestCase {
|
||||
try test(makeDatabaseQueue())
|
||||
try test(makeDatabasePool())
|
||||
try test(makeDatabasePool().makeSnapshot())
|
||||
#if (compiler(<5.7.1) && (os(macOS) || targetEnvironment(macCatalyst))) || GRDBCIPHER || (GRDBCUSTOMSQLITE && !SQLITE_ENABLE_SNAPSHOT)
|
||||
#else
|
||||
try test(makeDatabasePool().makeSnapshotPool())
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - Backup
|
||||
@@ -300,6 +336,9 @@ class DatabaseReaderTests : GRDBTestCase {
|
||||
try test(setup(makeDatabaseQueue(configuration: Configuration())))
|
||||
try test(setup(makeDatabasePool(configuration: Configuration())))
|
||||
try test(setup(makeDatabasePool(configuration: Configuration())).makeSnapshot())
|
||||
#if (compiler(<5.7.1) && (os(macOS) || targetEnvironment(macCatalyst))) || GRDBCIPHER || (GRDBCUSTOMSQLITE && !SQLITE_ENABLE_SNAPSHOT)
|
||||
#else
|
||||
try test(setup(makeDatabasePool(configuration: Configuration())).makeSnapshotPool())
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user