Fix compiler warnings for Swift 5.8

This commit is contained in:
Gwendal Roué committed 2023-03-22 18:40:37 +01:00
1 parent 018ae03f8e
commit 5facc24ebb
1 file changed
+20
@@ -782,7 +782,11 @@ class ValueObservationTests: GRDBTestCase {
assertValueObservationRecordingMatch(recorded: counts, expected: [0, 1, 2])
// Observation was ended
#if compiler(>=5.8)
await fulfillment(of: [cancellationExpectation], timeout: 2)
#else
wait(for: [cancellationExpectation], timeout: 2)
#endif
}
try await AsyncTest(test).run { try DatabaseQueue() }
@@ -816,7 +820,11 @@ class ValueObservationTests: GRDBTestCase {
assertValueObservationRecordingMatch(recorded: counts, expected: [0, 1, 2])
// Observation was ended
#if compiler(>=5.8)
await fulfillment(of: [cancellationExpectation], timeout: 2)
#else
wait(for: [cancellationExpectation], timeout: 2)
#endif
}
try await AsyncTest(test).run { try DatabaseQueue() }
@@ -854,7 +862,11 @@ class ValueObservationTests: GRDBTestCase {
assertValueObservationRecordingMatch(recorded: counts, expected: [0, 1, 2])
// Observation was ended
#if compiler(>=5.8)
await fulfillment(of: [cancellationExpectation], timeout: 2)
#else
wait(for: [cancellationExpectation], timeout: 2)
#endif
}
try await AsyncTest(test).run { try DatabaseQueue() }
@@ -889,7 +901,11 @@ class ValueObservationTests: GRDBTestCase {
assertValueObservationRecordingMatch(recorded: counts, expected: [0])
// Observation was ended
#if compiler(>=5.8)
await fulfillment(of: [cancellationExpectation], timeout: 2)
#else
wait(for: [cancellationExpectation], timeout: 2)
#endif
}
try await AsyncTest(test).run { try DatabaseQueue() }
@@ -936,7 +952,11 @@ class ValueObservationTests: GRDBTestCase {
XCTAssertEqual(cancelledValue, "cancelled loop")
// Make sure observation was cancelled as well
#if compiler(>=5.8)
await fulfillment(of: [cancellationExpectation], timeout: 2)
#else
wait(for: [cancellationExpectation], timeout: 2)
#endif
}
try await AsyncTest(test).run { try DatabaseQueue() }