From a9feac133926fe10ed39794f658e25ac2333d716 Mon Sep 17 00:00:00 2001 From: baegteun Date: Tue, 17 Jan 2023 13:58:37 +0900 Subject: [PATCH] :recycle: :: OSX -> macOS in Availability Check --- GRDB/Core/Database+Statements.swift | 2 +- GRDB/Core/DatabasePublishers.swift | 2 +- GRDB/Core/DatabaseReader.swift | 6 ++--- GRDB/Core/DatabaseRegionObservation.swift | 6 ++--- GRDB/Core/DatabaseWriter.swift | 10 +++---- GRDB/Core/Statement.swift | 2 +- GRDB/Core/TransactionObserver.swift | 2 +- GRDB/FTS/FTS3.swift | 2 +- GRDB/FTS/FTS5.swift | 4 +-- GRDB/Fixits.swift | 6 ++--- GRDB/Migration/DatabaseMigrator.swift | 4 +-- .../Request/RequestProtocols.swift | 2 +- GRDB/QueryInterface/SQL/SQLExpression.swift | 4 +-- GRDB/QueryInterface/SQL/Table.swift | 6 ++--- .../TableRecord+QueryInterfaceRequest.swift | 2 +- GRDB/Record/FetchableRecord+TableRecord.swift | 4 +-- GRDB/Record/TableRecord.swift | 6 ++--- GRDB/Utils/OnDemandFuture.swift | 4 +-- GRDB/Utils/ReceiveValuesOn.swift | 6 ++--- .../SharedValueObservation.swift | 2 +- GRDB/ValueObservation/ValueObservation.swift | 4 +-- .../AvailableElements.swift | 2 +- .../PublisherExpectations/Finished.swift | 2 +- .../PublisherExpectations/Inverted.swift | 2 +- .../PublisherExpectations/Map.swift | 4 +-- .../PublisherExpectations/Next.swift | 2 +- .../PublisherExpectations/NextOne.swift | 2 +- .../PublisherExpectations/Prefix.swift | 2 +- .../PublisherExpectations/Recording.swift | 2 +- Tests/CombineExpectations/Recorder.swift | 8 +++--- .../DatabaseReaderReadPublisherTests.swift | 12 ++++----- ...abaseRegionObservationPublisherTests.swift | 4 +-- .../DatabaseWriterWritePublisherTests.swift | 26 +++++++++---------- Tests/GRDBCombineTests/Support.swift | 4 +-- .../ValueObservationPublisherTests.swift | 24 ++++++++--------- .../DatabaseDateEncodingStrategyTests.swift | 8 +++--- Tests/GRDBTests/DatabaseMigratorTests.swift | 12 ++++----- .../DatabaseUUIDEncodingStrategyTests.swift | 8 +++--- Tests/GRDBTests/DatabaseWriterTests.swift | 2 +- Tests/GRDBTests/FTS3TableBuilderTests.swift | 2 +- Tests/GRDBTests/FTS5TableBuilderTests.swift | 2 +- .../QueryInterfaceRequestTests.swift | 8 +++--- ...imalNonOptionalPrimaryKeySingleTests.swift | 20 +++++++------- .../RecordMinimalPrimaryKeyRowIDTests.swift | 20 +++++++------- .../RecordMinimalPrimaryKeySingleTests.swift | 20 +++++++------- .../RecordPrimaryKeyHiddenRowIDTests.swift | 20 +++++++------- .../SharedValueObservationTests.swift | 8 +++--- ...bleRecord+QueryInterfaceRequestTests.swift | 4 +-- Tests/GRDBTests/TableRecordDeleteTests.swift | 16 ++++++------ Tests/GRDBTests/TableRecordUpdateTests.swift | 4 +-- Tests/GRDBTests/TableTests.swift | 12 ++++----- 51 files changed, 174 insertions(+), 174 deletions(-) diff --git a/GRDB/Core/Database+Statements.swift b/GRDB/Core/Database+Statements.swift index 6a8d52f01..8b44d96af 100644 --- a/GRDB/Core/Database+Statements.swift +++ b/GRDB/Core/Database+Statements.swift @@ -510,7 +510,7 @@ struct StatementCache { let statement = try db.makeStatement(sql: sql, prepFlags: CUnsignedInt(SQLITE_PREPARE_PERSISTENT)) #else let statement: Statement - if #available(iOS 12.0, OSX 10.14, watchOS 5.0, *) { + if #available(iOS 12.0, macOS 10.14, watchOS 5.0, *) { statement = try db.makeStatement(sql: sql, prepFlags: CUnsignedInt(SQLITE_PREPARE_PERSISTENT)) } else { statement = try db.makeStatement(sql: sql) diff --git a/GRDB/Core/DatabasePublishers.swift b/GRDB/Core/DatabasePublishers.swift index 3aa69d9d9..f0ca2899f 100644 --- a/GRDB/Core/DatabasePublishers.swift +++ b/GRDB/Core/DatabasePublishers.swift @@ -1,5 +1,5 @@ #if canImport(Combine) /// A namespace for database Combine publishers. -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public enum DatabasePublishers { } #endif diff --git a/GRDB/Core/DatabaseReader.swift b/GRDB/Core/DatabaseReader.swift index 6bea5c1bb..3c443daec 100644 --- a/GRDB/Core/DatabaseReader.swift +++ b/GRDB/Core/DatabaseReader.swift @@ -532,7 +532,7 @@ extension DatabaseReader { /// /// - parameter scheduler: A Combine Scheduler. /// - parameter value: A closure which accesses the database. - @available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) + @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func readPublisher( receiveOn scheduler: some Combine.Scheduler = DispatchQueue.main, value: @escaping (Database) throws -> Output) @@ -550,7 +550,7 @@ extension DatabaseReader { } } -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension DatabasePublishers { /// A publisher that reads from the database. /// @@ -569,7 +569,7 @@ extension DatabasePublishers { } } -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension Publisher where Failure == Error { fileprivate func eraseToReadPublisher() -> DatabasePublishers.Read { .init(upstream: eraseToAnyPublisher()) diff --git a/GRDB/Core/DatabaseRegionObservation.swift b/GRDB/Core/DatabaseRegionObservation.swift index eb95739af..600212bf1 100644 --- a/GRDB/Core/DatabaseRegionObservation.swift +++ b/GRDB/Core/DatabaseRegionObservation.swift @@ -231,7 +231,7 @@ extension DatabaseRegionObservation { } #if canImport(Combine) -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension DatabaseRegionObservation { // MARK: - Publishing Impactful Transactions @@ -243,7 +243,7 @@ extension DatabaseRegionObservation { /// /// Do not reschedule the publisher with `receive(on:options:)` or any /// `Publisher` method that schedules publisher elements. - @available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) + @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func publisher(in writer: some DatabaseWriter) -> DatabasePublishers.DatabaseRegion { DatabasePublishers.DatabaseRegion(self, in: writer) } @@ -284,7 +284,7 @@ private class DatabaseRegionObserver: TransactionObserver { } #if canImport(Combine) -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension DatabasePublishers { /// A publisher that tracks transactions that modify a database region. /// diff --git a/GRDB/Core/DatabaseWriter.swift b/GRDB/Core/DatabaseWriter.swift index a1ada352c..3f50dc226 100644 --- a/GRDB/Core/DatabaseWriter.swift +++ b/GRDB/Core/DatabaseWriter.swift @@ -516,7 +516,7 @@ extension DatabaseWriter { /// /// - Parameter filePath: file path for new database @_disfavoredOverload // SR-15150 Async overloading in protocol implementation fails - @available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) + @available(macOS 10.16, iOS 14, tvOS 14, watchOS 7, *) public func vacuum(into filePath: String) throws { try writeWithoutTransaction { try $0.execute(sql: "VACUUM INTO ?", arguments: [filePath]) @@ -775,7 +775,7 @@ extension DatabaseWriter { /// /// - parameter scheduler: A Combine Scheduler. /// - parameter updates: A closure which accesses the database. - @available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) + @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func writePublisher( receiveOn scheduler: some Combine.Scheduler = DispatchQueue.main, updates: @escaping (Database) throws -> Output) @@ -840,7 +840,7 @@ extension DatabaseWriter { /// - parameter scheduler: A Combine Scheduler. /// - parameter updates: A closure which writes in the database. /// - parameter value: A closure which reads from the database. - @available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) + @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func writePublisher( receiveOn scheduler: S = DispatchQueue.main, updates: @escaping (Database) throws -> T, @@ -872,7 +872,7 @@ extension DatabaseWriter { } } -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension DatabasePublishers { /// A publisher that writes into the database. /// @@ -891,7 +891,7 @@ extension DatabasePublishers { } } -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension Publisher where Failure == Error { fileprivate func eraseToWritePublisher() -> DatabasePublishers.Write { .init(upstream: self.eraseToAnyPublisher()) diff --git a/GRDB/Core/Statement.swift b/GRDB/Core/Statement.swift index 39e98827f..2f62314dc 100644 --- a/GRDB/Core/Statement.swift +++ b/GRDB/Core/Statement.swift @@ -175,7 +175,7 @@ public final class Statement { database.sqliteConnection, statementStart, -1, prepFlags, &sqliteStatement, statementEnd) #else - if #available(iOS 12.0, OSX 10.14, tvOS 12.0, watchOS 5.0, *) { + if #available(iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0, *) { code = sqlite3_prepare_v3( database.sqliteConnection, statementStart, -1, prepFlags, &sqliteStatement, statementEnd) diff --git a/GRDB/Core/TransactionObserver.swift b/GRDB/Core/TransactionObserver.swift index e16a0f12d..00fca82e7 100644 --- a/GRDB/Core/TransactionObserver.swift +++ b/GRDB/Core/TransactionObserver.swift @@ -1125,7 +1125,7 @@ public protocol TransactionObserver: AnyObject { /// /// Requires SQLite compiled with option SQLITE_ENABLE_PREUPDATE_HOOK. /// - /// As of OSX 10.11.5, and iOS 9.3.2, the built-in SQLite library + /// As of macOS 10.11.5, and iOS 9.3.2, the built-in SQLite library /// does not have this enabled, so you'll need to compile your own /// version of SQLite: /// See diff --git a/GRDB/FTS/FTS3.swift b/GRDB/FTS/FTS3.swift index d93549816..0dfada285 100644 --- a/GRDB/FTS/FTS3.swift +++ b/GRDB/FTS/FTS3.swift @@ -42,7 +42,7 @@ public struct FTS3 { /// Remove diacritics from Latin script characters. /// /// This option matches the `remove_diacritics=2` tokenizer argument. - @available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) // SQLite 3.27+ + @available(macOS 10.16, iOS 14, tvOS 14, watchOS 7, *) // SQLite 3.27+ case remove #endif } diff --git a/GRDB/FTS/FTS5.swift b/GRDB/FTS/FTS5.swift index 5c1c7fb36..54b7f83ae 100644 --- a/GRDB/FTS/FTS5.swift +++ b/GRDB/FTS/FTS5.swift @@ -30,7 +30,7 @@ public struct FTS5: VirtualTableModule { /// Remove diacritics from Latin script characters. This /// option matches the raw "remove_diacritics=2" tokenizer argument, /// available from SQLite 3.27.0 - @available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) + @available(macOS 10.16, iOS 14, tvOS 14, watchOS 7, *) case remove #endif } @@ -220,7 +220,7 @@ public struct FTS5: VirtualTableModule { // GRDB is linked against the system SQLite. // // Do we use SQLite 3.19.3 (iOS 11.4), or SQLite 3.24.0 (iOS 12.0)? - if #available(iOS 12.0, OSX 10.14, tvOS 12.0, watchOS 5.0, *) { + if #available(iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0, *) { // SQLite 3.24.0 or more return api_v2(db, sqlite3_prepare_v3, sqlite3_bind_pointer) } else { diff --git a/GRDB/Fixits.swift b/GRDB/Fixits.swift index 8ff802b97..126f3ceb0 100644 --- a/GRDB/Fixits.swift +++ b/GRDB/Fixits.swift @@ -119,7 +119,7 @@ extension PersistableRecord { public func performSave(_ db: Database) throws { preconditionFailure() } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension QueryInterfaceRequest where RowDecoder: Identifiable, RowDecoder.ID: DatabaseValueConvertible { @available(*, unavailable, message: "selectID() has been removed. You may use selectPrimaryKey(as:) instead.") public func selectID() -> QueryInterfaceRequest { preconditionFailure() } @@ -144,13 +144,13 @@ extension SelectionRequest { @available(*, unavailable, renamed: "SQLExpression.AssociativeBinaryOperator") public typealias SQLAssociativeBinaryOperator = SQLExpression.AssociativeBinaryOperator -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension Table where RowDecoder: Identifiable, RowDecoder.ID: DatabaseValueConvertible { @available(*, unavailable, message: "selectID() has been removed. You may use selectPrimaryKey(as:) instead.") public func selectID() -> QueryInterfaceRequest { preconditionFailure() } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension TableRecord where Self: Identifiable, ID: DatabaseValueConvertible { @available(*, unavailable, message: "selectID() has been removed. You may use selectPrimaryKey(as:) instead.") public static func selectID() -> QueryInterfaceRequest { preconditionFailure() } diff --git a/GRDB/Migration/DatabaseMigrator.swift b/GRDB/Migration/DatabaseMigrator.swift index 974fa753b..6e0813243 100644 --- a/GRDB/Migration/DatabaseMigrator.swift +++ b/GRDB/Migration/DatabaseMigrator.swift @@ -490,7 +490,7 @@ extension DatabaseMigrator { /// - parameter writer: A DatabaseWriter. /// where migrations should apply. /// - parameter scheduler: A Combine Scheduler. - @available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) + @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func migratePublisher( _ writer: some DatabaseWriter, receiveOn scheduler: some Scheduler = DispatchQueue.main) @@ -508,7 +508,7 @@ extension DatabaseMigrator { } } -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension DatabasePublishers { /// A publisher that migrates a database. /// diff --git a/GRDB/QueryInterface/Request/RequestProtocols.swift b/GRDB/QueryInterface/Request/RequestProtocols.swift index 553511e19..d4cb64ff2 100644 --- a/GRDB/QueryInterface/Request/RequestProtocols.swift +++ b/GRDB/QueryInterface/Request/RequestProtocols.swift @@ -570,7 +570,7 @@ extension TableRequest where Self: FilteredRequest, Self: TypedRequest { } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension TableRequest where Self: FilteredRequest, Self: TypedRequest, diff --git a/GRDB/QueryInterface/SQL/SQLExpression.swift b/GRDB/QueryInterface/SQL/SQLExpression.swift index e9de5892d..b19c1a52e 100644 --- a/GRDB/QueryInterface/SQL/SQLExpression.swift +++ b/GRDB/QueryInterface/SQL/SQLExpression.swift @@ -1893,13 +1893,13 @@ extension SQLSpecificExpressible { } #elseif !GRDBCIPHER /// An ordering term for ascending order (nulls last). - @available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) + @available(macOS 10.16, iOS 14, tvOS 14, watchOS 7, *) public var ascNullsLast: SQLOrdering { .ascNullsLast(sqlExpression) } /// An ordering term for descending order (nulls first). - @available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) + @available(macOS 10.16, iOS 14, tvOS 14, watchOS 7, *) public var descNullsFirst: SQLOrdering { .descNullsFirst(sqlExpression) } diff --git a/GRDB/QueryInterface/SQL/Table.swift b/GRDB/QueryInterface/SQL/Table.swift index d6ec258be..6ae1b5306 100644 --- a/GRDB/QueryInterface/SQL/Table.swift +++ b/GRDB/QueryInterface/SQL/Table.swift @@ -723,7 +723,7 @@ extension Table { } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension Table where RowDecoder: Identifiable, RowDecoder.ID: DatabaseValueConvertible { /// Returns a request filtered by primary key. /// @@ -1546,7 +1546,7 @@ extension Table { } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension Table where RowDecoder: Identifiable, RowDecoder.ID: DatabaseValueConvertible @@ -1688,7 +1688,7 @@ extension Table { } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension Table where RowDecoder: Identifiable, RowDecoder.ID: DatabaseValueConvertible diff --git a/GRDB/QueryInterface/TableRecord+QueryInterfaceRequest.swift b/GRDB/QueryInterface/TableRecord+QueryInterfaceRequest.swift index 00ec06396..0be283ee9 100644 --- a/GRDB/QueryInterface/TableRecord+QueryInterfaceRequest.swift +++ b/GRDB/QueryInterface/TableRecord+QueryInterfaceRequest.swift @@ -605,7 +605,7 @@ extension TableRecord { } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension TableRecord where Self: Identifiable, ID: DatabaseValueConvertible { /// Returns a request filtered by primary key. /// diff --git a/GRDB/Record/FetchableRecord+TableRecord.swift b/GRDB/Record/FetchableRecord+TableRecord.swift index bce826b5b..66376a636 100644 --- a/GRDB/Record/FetchableRecord+TableRecord.swift +++ b/GRDB/Record/FetchableRecord+TableRecord.swift @@ -217,7 +217,7 @@ extension FetchableRecord where Self: TableRecord { } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension FetchableRecord where Self: TableRecord & Identifiable, ID: DatabaseValueConvertible { // MARK: Fetching by Single-Column Primary Key @@ -359,7 +359,7 @@ extension FetchableRecord where Self: TableRecord & Hashable { } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension FetchableRecord where Self: TableRecord & Hashable & Identifiable, ID: DatabaseValueConvertible { /// Returns a set of records identified by their primary keys. /// diff --git a/GRDB/Record/TableRecord.swift b/GRDB/Record/TableRecord.swift index 86d0443c9..bb294a189 100644 --- a/GRDB/Record/TableRecord.swift +++ b/GRDB/Record/TableRecord.swift @@ -309,7 +309,7 @@ extension TableRecord { } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension TableRecord where Self: Identifiable, ID: DatabaseValueConvertible { /// Returns whether a record exists for this primary key. /// @@ -445,7 +445,7 @@ extension TableRecord { } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension TableRecord where Self: Identifiable, ID: DatabaseValueConvertible { /// Deletes records identified by their primary keys, and returns the number /// of deleted records. @@ -706,7 +706,7 @@ extension TableRecord { } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension TableRecord where Self: Identifiable, ID: DatabaseValueConvertible { /// Returns an error for a record that does not exist in the database. /// diff --git a/GRDB/Utils/OnDemandFuture.swift b/GRDB/Utils/OnDemandFuture.swift index 6a5e71d3f..b23b4c321 100644 --- a/GRDB/Utils/OnDemandFuture.swift +++ b/GRDB/Utils/OnDemandFuture.swift @@ -14,7 +14,7 @@ import Foundation /// Both two extra scheduling guarantees are used by GRDB in order to be /// able to spawn concurrent database reads right from the database writer /// queue, and fulfill GRDB preconditions. -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) struct OnDemandFuture: Publisher { typealias Promise = (Result) -> Void typealias Output = Output @@ -33,7 +33,7 @@ struct OnDemandFuture: Publisher { } } -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) private class OnDemandFutureSubscription: Subscription { typealias Promise = (Result) -> Void diff --git a/GRDB/Utils/ReceiveValuesOn.swift b/GRDB/Utils/ReceiveValuesOn.swift index 9bd6cc2b8..0f740e9b0 100644 --- a/GRDB/Utils/ReceiveValuesOn.swift +++ b/GRDB/Utils/ReceiveValuesOn.swift @@ -11,7 +11,7 @@ import Foundation /// This scheduling guarantee is used by GRDB in order to be able /// to make promises on the scheduling of database values without surprising /// the users as in . -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) struct ReceiveValuesOn: Publisher { typealias Output = Upstream.Output typealias Failure = Upstream.Failure @@ -30,7 +30,7 @@ struct ReceiveValuesOn: Publisher { } } -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) private class ReceiveValuesOnSubscription: Subscription, Subscriber where Upstream: Publisher, @@ -211,7 +211,7 @@ where } } -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension Publisher { /// Specifies the scheduler on which to receive values from the publisher /// diff --git a/GRDB/ValueObservation/SharedValueObservation.swift b/GRDB/ValueObservation/SharedValueObservation.swift index 946a6c90f..fba772ccd 100644 --- a/GRDB/ValueObservation/SharedValueObservation.swift +++ b/GRDB/ValueObservation/SharedValueObservation.swift @@ -291,7 +291,7 @@ public final class SharedValueObservation { /// print("fresh players: \(players)") /// } /// ``` - @available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) + @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func publisher() -> DatabasePublishers.Value { DatabasePublishers.Value { onError, onChange in self.start(onError: onError, onChange: onChange) diff --git a/GRDB/ValueObservation/ValueObservation.swift b/GRDB/ValueObservation/ValueObservation.swift index d3f1bb2cb..54e7624c1 100644 --- a/GRDB/ValueObservation/ValueObservation.swift +++ b/GRDB/ValueObservation/ValueObservation.swift @@ -771,7 +771,7 @@ extension ValueObservation { /// - parameter scheduler: A ValueObservationScheduler. By default, fresh /// values are dispatched asynchronously on the main dispatch queue. /// - returns: A Combine publisher - @available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) + @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func publisher( in reader: some DatabaseReader, scheduling scheduler: some ValueObservationScheduler = .async(onQueue: .main)) @@ -788,7 +788,7 @@ extension ValueObservation { } } -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension DatabasePublishers { /// A publisher that publishes the values of a ``ValueObservation``. /// diff --git a/Tests/CombineExpectations/PublisherExpectations/AvailableElements.swift b/Tests/CombineExpectations/PublisherExpectations/AvailableElements.swift index 82947bcca..0a90a6484 100644 --- a/Tests/CombineExpectations/PublisherExpectations/AvailableElements.swift +++ b/Tests/CombineExpectations/PublisherExpectations/AvailableElements.swift @@ -1,7 +1,7 @@ #if canImport(Combine) import XCTest -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension PublisherExpectations { /// A publisher expectation which waits for the timeout to expire, or /// the recorded publisher to complete. diff --git a/Tests/CombineExpectations/PublisherExpectations/Finished.swift b/Tests/CombineExpectations/PublisherExpectations/Finished.swift index 39fa11bfa..72bf496b9 100644 --- a/Tests/CombineExpectations/PublisherExpectations/Finished.swift +++ b/Tests/CombineExpectations/PublisherExpectations/Finished.swift @@ -17,7 +17,7 @@ import XCTest // try wait(for: recorder.finished.inverted, timeout: 1) // } -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension PublisherExpectations { /// A publisher expectation which waits for the recorded publisher /// to complete. diff --git a/Tests/CombineExpectations/PublisherExpectations/Inverted.swift b/Tests/CombineExpectations/PublisherExpectations/Inverted.swift index 076611d34..29a2ef068 100644 --- a/Tests/CombineExpectations/PublisherExpectations/Inverted.swift +++ b/Tests/CombineExpectations/PublisherExpectations/Inverted.swift @@ -1,7 +1,7 @@ #if canImport(Combine) import XCTest -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension PublisherExpectations { /// A publisher expectation that fails if the base expectation is fulfilled. /// diff --git a/Tests/CombineExpectations/PublisherExpectations/Map.swift b/Tests/CombineExpectations/PublisherExpectations/Map.swift index 087efbd33..96925dddc 100644 --- a/Tests/CombineExpectations/PublisherExpectations/Map.swift +++ b/Tests/CombineExpectations/PublisherExpectations/Map.swift @@ -1,7 +1,7 @@ #if canImport(Combine) import XCTest -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension PublisherExpectations { /// A publisher expectation that transforms the value of a base expectation. /// @@ -20,7 +20,7 @@ extension PublisherExpectations { } } -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension PublisherExpectation { /// Returns a publisher expectation that transforms the value of the /// base expectation. diff --git a/Tests/CombineExpectations/PublisherExpectations/Next.swift b/Tests/CombineExpectations/PublisherExpectations/Next.swift index 937e3b427..baeb99c7f 100644 --- a/Tests/CombineExpectations/PublisherExpectations/Next.swift +++ b/Tests/CombineExpectations/PublisherExpectations/Next.swift @@ -1,7 +1,7 @@ #if canImport(Combine) import XCTest -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension PublisherExpectations { /// A publisher expectation which waits for the recorded publisher to emit /// `count` elements, or to complete. diff --git a/Tests/CombineExpectations/PublisherExpectations/NextOne.swift b/Tests/CombineExpectations/PublisherExpectations/NextOne.swift index 6333b6b20..fcf250529 100644 --- a/Tests/CombineExpectations/PublisherExpectations/NextOne.swift +++ b/Tests/CombineExpectations/PublisherExpectations/NextOne.swift @@ -1,7 +1,7 @@ #if canImport(Combine) import XCTest -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension PublisherExpectations { /// A publisher expectation which waits for the recorded publisher to emit /// one element, or to complete. diff --git a/Tests/CombineExpectations/PublisherExpectations/Prefix.swift b/Tests/CombineExpectations/PublisherExpectations/Prefix.swift index 274050898..23a05b3c6 100644 --- a/Tests/CombineExpectations/PublisherExpectations/Prefix.swift +++ b/Tests/CombineExpectations/PublisherExpectations/Prefix.swift @@ -1,7 +1,7 @@ #if canImport(Combine) import XCTest -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension PublisherExpectations { /// A publisher expectation which waits for the recorded publisher to emit /// `maxLength` elements, or to complete. diff --git a/Tests/CombineExpectations/PublisherExpectations/Recording.swift b/Tests/CombineExpectations/PublisherExpectations/Recording.swift index 97d76d394..0cd63a015 100644 --- a/Tests/CombineExpectations/PublisherExpectations/Recording.swift +++ b/Tests/CombineExpectations/PublisherExpectations/Recording.swift @@ -2,7 +2,7 @@ import Combine import XCTest -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension PublisherExpectations { /// A publisher expectation which waits for the recorded publisher /// to complete. diff --git a/Tests/CombineExpectations/Recorder.swift b/Tests/CombineExpectations/Recorder.swift index 6b91f405c..660318905 100644 --- a/Tests/CombineExpectations/Recorder.swift +++ b/Tests/CombineExpectations/Recorder.swift @@ -13,7 +13,7 @@ import XCTest /// /// let elements = try wait(for: recorder.elements, timeout: 1) /// XCTAssertEqual(elements, ["foo", "bar", "baz"]) -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public class Recorder: Subscriber { public typealias Input = Input public typealias Failure = Failure @@ -275,7 +275,7 @@ public class Recorder: Subscriber { // MARK: - Publisher Expectations -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension PublisherExpectations { /// The type of the publisher expectation returned by `Recorder.completion`. public typealias Completion = Map, Subscribers.Completion> @@ -290,7 +290,7 @@ extension PublisherExpectations { public typealias Single = Map, Input> } -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension Recorder { /// Returns a publisher expectation which waits for the timeout to expire, /// or the recorded publisher to complete. @@ -572,7 +572,7 @@ extension Recorder { // MARK: - Publisher + Recorder -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension Publisher { /// Returns a subscribed Recorder. /// diff --git a/Tests/GRDBCombineTests/DatabaseReaderReadPublisherTests.swift b/Tests/GRDBCombineTests/DatabaseReaderReadPublisherTests.swift index 1f002f238..5c7423bfa 100644 --- a/Tests/GRDBCombineTests/DatabaseReaderReadPublisherTests.swift +++ b/Tests/GRDBCombineTests/DatabaseReaderReadPublisherTests.swift @@ -22,7 +22,7 @@ class DatabaseReaderReadPublisherTests : XCTestCase { // MARK: - func testReadPublisher() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -128,7 +128,7 @@ class DatabaseReaderReadPublisherTests : XCTestCase { // frame #71: 0x00007fff72311cc9 libdyld.dylib`start + 1 // frame #72: 0x00007fff72311cc9 libdyld.dylib`start + 1 func testReadPublisherError() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -157,7 +157,7 @@ class DatabaseReaderReadPublisherTests : XCTestCase { // MARK: - func testReadPublisherIsAsynchronous() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -197,7 +197,7 @@ class DatabaseReaderReadPublisherTests : XCTestCase { // MARK: - func testReadPublisherDefaultScheduler() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -237,7 +237,7 @@ class DatabaseReaderReadPublisherTests : XCTestCase { // MARK: - func testReadPublisherCustomScheduler() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -278,7 +278,7 @@ class DatabaseReaderReadPublisherTests : XCTestCase { // MARK: - func testReadPublisherIsReadonly() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } diff --git a/Tests/GRDBCombineTests/DatabaseRegionObservationPublisherTests.swift b/Tests/GRDBCombineTests/DatabaseRegionObservationPublisherTests.swift index a870a0066..bcda3445e 100644 --- a/Tests/GRDBCombineTests/DatabaseRegionObservationPublisherTests.swift +++ b/Tests/GRDBCombineTests/DatabaseRegionObservationPublisherTests.swift @@ -20,7 +20,7 @@ private struct Player: Codable, FetchableRecord, PersistableRecord { class DatabaseRegionObservationPublisherTests : XCTestCase { func testChangesNotifications() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -61,7 +61,7 @@ class DatabaseRegionObservationPublisherTests : XCTestCase { // TODO: do the same, but asynchronously. If this is too hard, update the // public API so that users can easily do it. func testPrependInitialDatabaseSync() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } diff --git a/Tests/GRDBCombineTests/DatabaseWriterWritePublisherTests.swift b/Tests/GRDBCombineTests/DatabaseWriterWritePublisherTests.swift index 4f07e7960..e02996c70 100644 --- a/Tests/GRDBCombineTests/DatabaseWriterWritePublisherTests.swift +++ b/Tests/GRDBCombineTests/DatabaseWriterWritePublisherTests.swift @@ -22,7 +22,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWritePublisher() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -49,7 +49,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWritePublisherValue() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -76,7 +76,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWritePublisherError() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -99,7 +99,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { } func testWritePublisherErrorRollbacksTransaction() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -132,7 +132,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWritePublisherIsAsynchronous() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -168,7 +168,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWritePublisherDefaultScheduler() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -206,7 +206,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWritePublisherCustomScheduler() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -247,7 +247,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // TODO: Fix flaky test with both pool and on-disk queue: // - Expectation timeout func testWriteThenReadPublisher() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -274,7 +274,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWriteThenReadPublisherIsReadonly() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -299,7 +299,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWriteThenReadPublisherWriteError() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -322,7 +322,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { } func testWriteThenReadPublisherWriteErrorRollbacksTransaction() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -359,7 +359,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // TODO: Fix flaky test with both pool and on-disk queue: // - Expectation timeout func testWriteThenReadPublisherReadError() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -386,7 +386,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // Regression test against deadlocks created by concurrent completion // and cancellations triggered by .switchToLatest().prefix(1) func testDeadlockPrevention() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } diff --git a/Tests/GRDBCombineTests/Support.swift b/Tests/GRDBCombineTests/Support.swift index bf9c1d3a7..70c688e37 100644 --- a/Tests/GRDBCombineTests/Support.swift +++ b/Tests/GRDBCombineTests/Support.swift @@ -100,7 +100,7 @@ final class AsyncTest { } } -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func assertNoFailure( _ completion: Subscribers.Completion, file: StaticString = #file, @@ -111,7 +111,7 @@ public func assertNoFailure( } } -@available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func assertFailure( _ completion: Subscribers.Completion, file: StaticString = #file, diff --git a/Tests/GRDBCombineTests/ValueObservationPublisherTests.swift b/Tests/GRDBCombineTests/ValueObservationPublisherTests.swift index eedd4afc3..cd268268a 100644 --- a/Tests/GRDBCombineTests/ValueObservationPublisherTests.swift +++ b/Tests/GRDBCombineTests/ValueObservationPublisherTests.swift @@ -22,7 +22,7 @@ class ValueObservationPublisherTests : XCTestCase { // MARK: - Default Scheduler func testDefaultSchedulerChangesNotifications() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -64,7 +64,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testDefaultSchedulerFirstValueIsEmittedAsynchronously() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -97,7 +97,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testDefaultSchedulerError() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -123,7 +123,7 @@ class ValueObservationPublisherTests : XCTestCase { // MARK: - Immediate Scheduler func testImmediateSchedulerChangesNotifications() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -165,7 +165,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testImmediateSchedulerEmitsFirstValueSynchronously() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -201,7 +201,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testImmediateSchedulerError() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -226,7 +226,7 @@ class ValueObservationPublisherTests : XCTestCase { // MARK: - Demand - @available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) + @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) private class DemandSubscriber: Subscriber { private var subscription: Subscription? let subject = PassthroughSubject() @@ -257,7 +257,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testDemandNoneReceivesNoElement() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -292,7 +292,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testDemandOneReceivesOneElement() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -330,7 +330,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testDemandOneDoesNotReceiveTwoElements() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -372,7 +372,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testDemandTwoReceivesTwoElements() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -418,7 +418,7 @@ class ValueObservationPublisherTests : XCTestCase { /// Regression test for https://github.com/groue/GRDB.swift/issues/1194 func testIssue1194() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } diff --git a/Tests/GRDBTests/DatabaseDateEncodingStrategyTests.swift b/Tests/GRDBTests/DatabaseDateEncodingStrategyTests.swift index aa4b996fa..65da240ed 100644 --- a/Tests/GRDBTests/DatabaseDateEncodingStrategyTests.swift +++ b/Tests/GRDBTests/DatabaseDateEncodingStrategyTests.swift @@ -50,7 +50,7 @@ private struct RecordWithDate: EncodableRecord, Enco var date: Date } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension RecordWithDate: Identifiable { var id: Date { date } } @@ -60,7 +60,7 @@ private struct RecordWithOptionalDate: EncodableReco var date: Date? } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension RecordWithOptionalDate: Identifiable { var id: Date? { date } } @@ -255,7 +255,7 @@ extension DatabaseDateEncodingStrategyTests { } func testFilterID() throws { - guard #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) else { throw XCTSkip("Identifiable not available") } @@ -335,7 +335,7 @@ extension DatabaseDateEncodingStrategyTests { } func testDeleteID() throws { - guard #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) else { throw XCTSkip("Identifiable not available") } diff --git a/Tests/GRDBTests/DatabaseMigratorTests.swift b/Tests/GRDBTests/DatabaseMigratorTests.swift index 144686272..1ada1b6d5 100644 --- a/Tests/GRDBTests/DatabaseMigratorTests.swift +++ b/Tests/GRDBTests/DatabaseMigratorTests.swift @@ -35,7 +35,7 @@ class DatabaseMigratorTests : GRDBTestCase { } func testEmptyMigratorPublisher() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -147,7 +147,7 @@ class DatabaseMigratorTests : GRDBTestCase { } func testNonEmptyMigratorPublisher() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -203,7 +203,7 @@ class DatabaseMigratorTests : GRDBTestCase { } func testEmptyMigratorPublisherIsAsynchronous() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -229,7 +229,7 @@ class DatabaseMigratorTests : GRDBTestCase { } func testNonEmptyMigratorPublisherIsAsynchronous() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -256,7 +256,7 @@ class DatabaseMigratorTests : GRDBTestCase { } func testMigratorPublisherDefaultScheduler() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -285,7 +285,7 @@ class DatabaseMigratorTests : GRDBTestCase { } func testMigratorPublisherCustomScheduler() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } diff --git a/Tests/GRDBTests/DatabaseUUIDEncodingStrategyTests.swift b/Tests/GRDBTests/DatabaseUUIDEncodingStrategyTests.swift index d898df7e7..ab6609bab 100644 --- a/Tests/GRDBTests/DatabaseUUIDEncodingStrategyTests.swift +++ b/Tests/GRDBTests/DatabaseUUIDEncodingStrategyTests.swift @@ -23,7 +23,7 @@ private struct RecordWithUUID: EncodableRecord, Enco var uuid: UUID } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension RecordWithUUID: Identifiable { var id: UUID { uuid } } @@ -33,7 +33,7 @@ private struct RecordWithOptionalUUID: EncodableReco var uuid: UUID? } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension RecordWithOptionalUUID: Identifiable { var id: UUID? { uuid } } @@ -180,7 +180,7 @@ extension DatabaseUUIDEncodingStrategyTests { } func testFilterID() throws { - guard #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) else { throw XCTSkip("Identifiable not available") } @@ -299,7 +299,7 @@ extension DatabaseUUIDEncodingStrategyTests { } func testDeleteID() throws { - guard #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) else { throw XCTSkip("Identifiable not available") } diff --git a/Tests/GRDBTests/DatabaseWriterTests.swift b/Tests/GRDBTests/DatabaseWriterTests.swift index 76a7eb88d..738f9524f 100644 --- a/Tests/GRDBTests/DatabaseWriterTests.swift +++ b/Tests/GRDBTests/DatabaseWriterTests.swift @@ -195,7 +195,7 @@ class DatabaseWriterTests : GRDBTestCase { } func testVacuumInto() throws { - guard #available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) else { + guard #available(macOS 10.16, iOS 14, tvOS 14, watchOS 7, *) else { throw XCTSkip("VACUUM INTO is not available") } // Prevent SQLCipher failures diff --git a/Tests/GRDBTests/FTS3TableBuilderTests.swift b/Tests/GRDBTests/FTS3TableBuilderTests.swift index cd51aab51..710721deb 100644 --- a/Tests/GRDBTests/FTS3TableBuilderTests.swift +++ b/Tests/GRDBTests/FTS3TableBuilderTests.swift @@ -76,7 +76,7 @@ class FTS3TableBuilderTests: GRDBTestCase { } #elseif !GRDBCIPHER func testUnicode61TokenizerDiacriticsRemove() throws { - guard #available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) else { + guard #available(macOS 10.16, iOS 14, tvOS 14, watchOS 7, *) else { throw XCTSkip() } let dbQueue = try makeDatabaseQueue() diff --git a/Tests/GRDBTests/FTS5TableBuilderTests.swift b/Tests/GRDBTests/FTS5TableBuilderTests.swift index 9bccf6c11..b1b42da14 100644 --- a/Tests/GRDBTests/FTS5TableBuilderTests.swift +++ b/Tests/GRDBTests/FTS5TableBuilderTests.swift @@ -130,7 +130,7 @@ class FTS5TableBuilderTests: GRDBTestCase { } #elseif !GRDBCIPHER func testUnicode61TokenizerDiacriticsRemove() throws { - guard #available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) else { + guard #available(macOS 10.16, iOS 14, tvOS 14, watchOS 7, *) else { throw XCTSkip() } diff --git a/Tests/GRDBTests/QueryInterfaceRequestTests.swift b/Tests/GRDBTests/QueryInterfaceRequestTests.swift index fa3c35f1c..56202265e 100644 --- a/Tests/GRDBTests/QueryInterfaceRequestTests.swift +++ b/Tests/GRDBTests/QueryInterfaceRequestTests.swift @@ -764,7 +764,7 @@ class QueryInterfaceRequestTests: GRDBTestCase { sql(dbQueue, tableRequest.order(Col.age.descNullsFirst)), "SELECT * FROM \"readers\" ORDER BY \"age\" DESC NULLS FIRST") #elseif !GRDBCIPHER - if #available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) { + if #available(macOS 10.16, iOS 14, tvOS 14, watchOS 7, *) { XCTAssertEqual( sql(dbQueue, tableRequest.order(Col.age.ascNullsLast)), "SELECT * FROM \"readers\" ORDER BY \"age\" ASC NULLS LAST") @@ -794,7 +794,7 @@ class QueryInterfaceRequestTests: GRDBTestCase { sql(dbQueue, tableRequest.order(Col.name.collating(.nocase).descNullsFirst)), "SELECT * FROM \"readers\" ORDER BY \"name\" COLLATE NOCASE DESC NULLS FIRST") #elseif !GRDBCIPHER - if #available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) { + if #available(macOS 10.16, iOS 14, tvOS 14, watchOS 7, *) { XCTAssertEqual( sql(dbQueue, tableRequest.order(Col.name.collating(.nocase).ascNullsLast)), "SELECT * FROM \"readers\" ORDER BY \"name\" COLLATE NOCASE ASC NULLS LAST") @@ -843,7 +843,7 @@ class QueryInterfaceRequestTests: GRDBTestCase { sql(dbQueue, tableRequest.order(Col.age.ascNullsLast).reversed()), "SELECT * FROM \"readers\" ORDER BY \"age\" DESC NULLS FIRST") #elseif !GRDBCIPHER - if #available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) { + if #available(macOS 10.16, iOS 14, tvOS 14, watchOS 7, *) { XCTAssertEqual( sql(dbQueue, tableRequest.order(Col.age.descNullsFirst).reversed()), "SELECT * FROM \"readers\" ORDER BY \"age\" ASC NULLS LAST") @@ -873,7 +873,7 @@ class QueryInterfaceRequestTests: GRDBTestCase { sql(dbQueue, tableRequest.order(Col.name.collating(.nocase).descNullsFirst).reversed()), "SELECT * FROM \"readers\" ORDER BY \"name\" COLLATE NOCASE ASC NULLS LAST") #elseif !GRDBCIPHER - if #available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) { + if #available(macOS 10.16, iOS 14, tvOS 14, watchOS 7, *) { XCTAssertEqual( sql(dbQueue, tableRequest.order(Col.name.collating(.nocase).ascNullsLast).reversed()), "SELECT * FROM \"readers\" ORDER BY \"name\" COLLATE NOCASE DESC NULLS FIRST") diff --git a/Tests/GRDBTests/RecordMinimalNonOptionalPrimaryKeySingleTests.swift b/Tests/GRDBTests/RecordMinimalNonOptionalPrimaryKeySingleTests.swift index 81240e7c2..6838e4da0 100644 --- a/Tests/GRDBTests/RecordMinimalNonOptionalPrimaryKeySingleTests.swift +++ b/Tests/GRDBTests/RecordMinimalNonOptionalPrimaryKeySingleTests.swift @@ -41,7 +41,7 @@ private class MinimalNonOptionalPrimaryKeySingle: Record, Hashable { } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension MinimalNonOptionalPrimaryKeySingle: Identifiable { } class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { @@ -460,7 +460,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [String] = [] let cursor = try MinimalNonOptionalPrimaryKeySingle.fetchCursor(db, ids: ids) @@ -499,7 +499,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.id }), Set(ids)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [String] = [] let fetchedRecords = try MinimalNonOptionalPrimaryKeySingle.fetchAll(db, ids: ids) @@ -537,7 +537,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.id }), Set(ids)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [String] = [] let fetchedRecords = try MinimalNonOptionalPrimaryKeySingle.fetchSet(db, ids: ids) @@ -572,7 +572,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalSingles\" WHERE \"id\" = '\(record.id)'") } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let fetchedRecord = try MinimalNonOptionalPrimaryKeySingle.fetchOne(db, id: record.id)! XCTAssertTrue(fetchedRecord.id == record.id) @@ -600,7 +600,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalSingles\" WHERE \"id\" = '\(record.id)'") } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { _ = try MinimalNonOptionalPrimaryKeySingle.find(db, key: "missing") XCTFail("Expected RecordError") @@ -640,7 +640,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [String] = [] let cursor = try MinimalNonOptionalPrimaryKeySingle.filter(ids: ids).fetchCursor(db) @@ -679,7 +679,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.id }), Set(ids)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [String] = [] let fetchedRecords = try MinimalNonOptionalPrimaryKeySingle.filter(ids: ids).fetchAll(db) @@ -717,7 +717,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.id }), Set(ids)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [String] = [] let fetchedRecords = try MinimalNonOptionalPrimaryKeySingle.filter(ids: ids).fetchSet(db) @@ -752,7 +752,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalSingles\" WHERE \"id\" = '\(record.id)'") } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let fetchedRecord = try MinimalNonOptionalPrimaryKeySingle.filter(id: record.id).fetchOne(db)! XCTAssertTrue(fetchedRecord.id == record.id) diff --git a/Tests/GRDBTests/RecordMinimalPrimaryKeyRowIDTests.swift b/Tests/GRDBTests/RecordMinimalPrimaryKeyRowIDTests.swift index 4bdc85eca..b3b8dc6e4 100644 --- a/Tests/GRDBTests/RecordMinimalPrimaryKeyRowIDTests.swift +++ b/Tests/GRDBTests/RecordMinimalPrimaryKeyRowIDTests.swift @@ -45,7 +45,7 @@ class MinimalRowID : Record, Hashable { } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension MinimalRowID: Identifiable { } class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { @@ -494,7 +494,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [Int64] = [] let cursor = try MinimalRowID.fetchCursor(db, ids: ids) @@ -533,7 +533,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [Int64] = [] let fetchedRecords = try MinimalRowID.fetchAll(db, ids: ids) @@ -571,7 +571,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [Int64] = [] let fetchedRecords = try MinimalRowID.fetchSet(db, ids: ids) @@ -606,7 +606,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalRowIDs\" WHERE \"id\" = \(record.id!)") } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let fetchedRecord = try MinimalRowID.fetchOne(db, id: record.id!)! XCTAssertTrue(fetchedRecord.id == record.id) @@ -637,7 +637,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalRowIDs\" WHERE \"id\" = \(record.id!)") } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { _ = try MinimalRowID.find(db, id: -1) XCTFail("Expected RecordError") @@ -680,7 +680,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [Int64] = [] let cursor = try MinimalRowID.filter(ids: ids).fetchCursor(db) @@ -719,7 +719,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [Int64] = [] let fetchedRecords = try MinimalRowID.filter(ids: ids).fetchAll(db) @@ -757,7 +757,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [Int64] = [] let fetchedRecords = try MinimalRowID.filter(ids: ids).fetchSet(db) @@ -792,7 +792,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalRowIDs\" WHERE \"id\" = \(record.id!)") } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let fetchedRecord = try MinimalRowID.filter(id: record.id!).fetchOne(db)! XCTAssertTrue(fetchedRecord.id == record.id) diff --git a/Tests/GRDBTests/RecordMinimalPrimaryKeySingleTests.swift b/Tests/GRDBTests/RecordMinimalPrimaryKeySingleTests.swift index 86bf02fcb..b745b5291 100644 --- a/Tests/GRDBTests/RecordMinimalPrimaryKeySingleTests.swift +++ b/Tests/GRDBTests/RecordMinimalPrimaryKeySingleTests.swift @@ -39,7 +39,7 @@ class MinimalSingle: Record, Hashable { } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension MinimalSingle: Identifiable { /// Test non-optional ID type var id: String { UUID! } @@ -518,7 +518,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let UUIDs: [String] = [] let cursor = try MinimalSingle.fetchCursor(db, ids: UUIDs) @@ -559,7 +559,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.UUID! }), Set(UUIDs)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let UUIDs: [String] = [] let fetchedRecords = try MinimalSingle.fetchAll(db, ids: UUIDs) @@ -599,7 +599,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.UUID! }), Set(UUIDs)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let UUIDs: [String] = [] let fetchedRecords = try MinimalSingle.fetchSet(db, ids: UUIDs) @@ -635,7 +635,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalSingles\" WHERE \"UUID\" = '\(record.UUID!)'") } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let fetchedRecord = try MinimalSingle.fetchOne(db, id: record.UUID!)! XCTAssertTrue(fetchedRecord.UUID == record.UUID) @@ -664,7 +664,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalSingles\" WHERE \"UUID\" = '\(record.UUID!)'") } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { _ = try MinimalSingle.find(db, id: "missing") XCTFail("Expected RecordError") @@ -706,7 +706,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let UUIDs: [String] = [] let cursor = try MinimalSingle.filter(ids: UUIDs).fetchCursor(db) @@ -747,7 +747,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.UUID! }), Set(UUIDs)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let UUIDs: [String] = [] let fetchedRecords = try MinimalSingle.filter(ids: UUIDs).fetchAll(db) @@ -787,7 +787,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.UUID! }), Set(UUIDs)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let UUIDs: [String] = [] let fetchedRecords = try MinimalSingle.filter(ids: UUIDs).fetchSet(db) @@ -823,7 +823,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalSingles\" WHERE \"UUID\" = '\(record.UUID!)'") } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let fetchedRecord = try MinimalSingle.filter(id: record.UUID!).fetchOne(db)! XCTAssertTrue(fetchedRecord.UUID == record.UUID) diff --git a/Tests/GRDBTests/RecordPrimaryKeyHiddenRowIDTests.swift b/Tests/GRDBTests/RecordPrimaryKeyHiddenRowIDTests.swift index bd9e4d0eb..3bb0bf09f 100644 --- a/Tests/GRDBTests/RecordPrimaryKeyHiddenRowIDTests.swift +++ b/Tests/GRDBTests/RecordPrimaryKeyHiddenRowIDTests.swift @@ -77,7 +77,7 @@ private class Person : Record, Hashable { } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension Person: Identifiable { } class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { @@ -586,7 +586,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [Int64] = [] let cursor = try Person.fetchCursor(db, ids: ids) @@ -625,7 +625,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [Int64] = [] let fetchedRecords = try Person.fetchAll(db, ids: ids) @@ -663,7 +663,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [Int64] = [] let fetchedRecords = try Person.fetchSet(db, ids: ids) @@ -701,7 +701,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT *, \"rowid\" FROM \"persons\" WHERE \"rowid\" = \(record.id!)") } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let fetchedRecord = try Person.fetchOne(db, id: record.id!)! XCTAssertTrue(fetchedRecord.id == record.id) @@ -738,7 +738,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT *, \"rowid\" FROM \"persons\" WHERE \"rowid\" = \(record.id!)") } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { _ = try Person.find(db, id: -1) XCTFail("Expected RecordError") @@ -784,7 +784,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [Int64] = [] let cursor = try Person.filter(ids: ids).fetchCursor(db) @@ -823,7 +823,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [Int64] = [] let fetchedRecords = try Person.filter(ids: ids).fetchAll(db) @@ -861,7 +861,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let ids: [Int64] = [] let fetchedRecords = try Person.filter(ids: ids).fetchSet(db) @@ -899,7 +899,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT *, \"rowid\" FROM \"persons\" WHERE \"rowid\" = \(record.id!)") } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { do { let fetchedRecord = try Person.filter(id: record.id!).fetchOne(db)! XCTAssertTrue(fetchedRecord.id == record.id) diff --git a/Tests/GRDBTests/SharedValueObservationTests.swift b/Tests/GRDBTests/SharedValueObservationTests.swift index e510fc73e..c7d4269b6 100644 --- a/Tests/GRDBTests/SharedValueObservationTests.swift +++ b/Tests/GRDBTests/SharedValueObservationTests.swift @@ -104,7 +104,7 @@ class SharedValueObservationTests: GRDBTestCase { #if canImport(Combine) func test_immediate_publisher() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -381,7 +381,7 @@ class SharedValueObservationTests: GRDBTestCase { #if canImport(Combine) func test_async_publisher() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -511,7 +511,7 @@ class SharedValueObservationTests: GRDBTestCase { #if canImport(Combine) func test_error_recovery_observationLifetime() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } @@ -567,7 +567,7 @@ class SharedValueObservationTests: GRDBTestCase { #if canImport(Combine) func test_error_recovery_whileObserved() throws { - guard #available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) else { throw XCTSkip("Combine is not available") } diff --git a/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift b/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift index 19182f7aa..17d2e5793 100644 --- a/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift +++ b/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift @@ -259,7 +259,7 @@ class TableRecordQueryInterfaceRequestTests: GRDBTestCase { sql(dbQueue, Reader.order(Col.age.descNullsFirst)), "SELECT * FROM \"readers\" ORDER BY \"age\" DESC NULLS FIRST") #elseif !GRDBCIPHER - if #available(OSX 10.16, iOS 14, tvOS 14, watchOS 7, *) { + if #available(macOS 10.16, iOS 14, tvOS 14, watchOS 7, *) { XCTAssertEqual( sql(dbQueue, Reader.order(Col.age.ascNullsLast)), "SELECT * FROM \"readers\" ORDER BY \"age\" ASC NULLS LAST") @@ -357,7 +357,7 @@ class TableRecordQueryInterfaceRequestTests: GRDBTestCase { } func testExistsIdentifiable() throws { - guard #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) else { + guard #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) else { throw XCTSkip("Identifiable is not available") } diff --git a/Tests/GRDBTests/TableRecordDeleteTests.swift b/Tests/GRDBTests/TableRecordDeleteTests.swift index ee8f21011..b8527e82a 100644 --- a/Tests/GRDBTests/TableRecordDeleteTests.swift +++ b/Tests/GRDBTests/TableRecordDeleteTests.swift @@ -6,7 +6,7 @@ private struct Hacker : TableRecord { var id: Int64? // Optional } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension Hacker: Identifiable { } private struct Person : Codable, PersistableRecord, FetchableRecord, Hashable { @@ -16,7 +16,7 @@ private struct Person : Codable, PersistableRecord, FetchableRecord, Hashable { var email: String } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension Person: Identifiable { } private struct Citizenship : TableRecord { @@ -46,7 +46,7 @@ class TableRecordDeleteTests: GRDBTestCase { XCTAssertTrue(deleted) XCTAssertEqual(try Hacker.fetchCount(db), 0) - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { try db.execute(sql: "INSERT INTO hackers (rowid, name) VALUES (?, ?)", arguments: [1, "Arthur"]) try XCTAssertFalse(Hacker.deleteOne(db, id: nil)) deleted = try Hacker.deleteOne(db, id: 1) @@ -62,7 +62,7 @@ class TableRecordDeleteTests: GRDBTestCase { XCTAssertEqual(deletedCount, 2) XCTAssertEqual(try Hacker.fetchCount(db), 1) - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { try db.execute(sql: "INSERT INTO hackers (rowid, name) VALUES (?, ?)", arguments: [2, "Barbara"]) try db.execute(sql: "INSERT INTO hackers (rowid, name) VALUES (?, ?)", arguments: [3, "Craig"]) let deletedCount = try Hacker.deleteAll(db, ids: [2, 3, 4]) @@ -85,7 +85,7 @@ class TableRecordDeleteTests: GRDBTestCase { XCTAssertTrue(deleted) XCTAssertEqual(try Person.fetchCount(db), 0) - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { try db.execute(sql: "INSERT INTO persons (id, name, email) VALUES (?, ?, ?)", arguments: [1, "Arthur", "arthur@example.com"]) deleted = try Person.deleteOne(db, id: 1) XCTAssertTrue(deleted) @@ -100,7 +100,7 @@ class TableRecordDeleteTests: GRDBTestCase { XCTAssertEqual(deletedCount, 2) XCTAssertEqual(try Person.fetchCount(db), 1) - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { try db.execute(sql: "INSERT INTO persons (id, name, email) VALUES (?, ?, ?)", arguments: [2, "Barbara", "barbara@example.com"]) try db.execute(sql: "INSERT INTO persons (id, name, email) VALUES (?, ?, ?)", arguments: [3, "Craig", "craig@example.com"]) let deletedCount = try Person.deleteAll(db, ids: [2, 3, 4]) @@ -190,7 +190,7 @@ class TableRecordDeleteTests: GRDBTestCase { try Person.filter(keys: [1, 2]).deleteAll(db) XCTAssertEqual(self.lastSQLQuery, "DELETE FROM \"persons\" WHERE \"id\" IN (1, 2)") - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { try Person.filter(id: 1).deleteAll(db) XCTAssertEqual(self.lastSQLQuery, "DELETE FROM \"persons\" WHERE \"id\" = 1") @@ -278,7 +278,7 @@ class TableRecordDeleteTests: GRDBTestCase { _ = try Person.filter(keys: [1, 2]).deleteAndFetchCursor(db).next() XCTAssertEqual(self.lastSQLQuery, "DELETE FROM \"persons\" WHERE \"id\" IN (1, 2) RETURNING *") - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { _ = try Person.filter(id: 1).deleteAndFetchCursor(db).next() XCTAssertEqual(self.lastSQLQuery, "DELETE FROM \"persons\" WHERE \"id\" = 1 RETURNING *") diff --git a/Tests/GRDBTests/TableRecordUpdateTests.swift b/Tests/GRDBTests/TableRecordUpdateTests.swift index eeabd3bfc..c7ca6dc55 100644 --- a/Tests/GRDBTests/TableRecordUpdateTests.swift +++ b/Tests/GRDBTests/TableRecordUpdateTests.swift @@ -17,7 +17,7 @@ private struct Player: Codable, PersistableRecord, FetchableRecord, Hashable { } } -@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) extension Player: Identifiable { } private enum Columns: String, ColumnExpression { @@ -56,7 +56,7 @@ class TableRecordUpdateTests: GRDBTestCase { UPDATE "player" SET "score" = 0 WHERE "id" IN (1, 2) """) - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { try Player.filter(id: 1).updateAll(db, assignment) XCTAssertEqual(self.lastSQLQuery, """ UPDATE "player" SET "score" = 0 WHERE "id" = 1 diff --git a/Tests/GRDBTests/TableTests.swift b/Tests/GRDBTests/TableTests.swift index 6b67e8092..01671e585 100644 --- a/Tests/GRDBTests/TableTests.swift +++ b/Tests/GRDBTests/TableTests.swift @@ -117,7 +117,7 @@ class TableTests: GRDBTestCase { """) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { struct Player: Identifiable { var id: Int64 } let t = Table("player") @@ -129,7 +129,7 @@ class TableTests: GRDBTestCase { """) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { struct Player: Identifiable { var id: Int64? } let t = Table("player") @@ -806,7 +806,7 @@ class TableTests: GRDBTestCase { """) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { // Non-optional ID struct Country: Identifiable { var id: String } @@ -821,7 +821,7 @@ class TableTests: GRDBTestCase { """) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { // Optional ID struct Country: Identifiable { var id: String? } @@ -920,7 +920,7 @@ class TableTests: GRDBTestCase { """) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { // Non-optional ID struct Country: Identifiable { var id: String } @@ -930,7 +930,7 @@ class TableTests: GRDBTestCase { """) } - if #available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6, *) { // Optional ID struct Country: Identifiable { var id: String? }