Skip to content

Commit e076644

Browse files
committed
Fix compilation error on iOS Xcode 13.3.1.app, macOS 12, Swift 5.6
1 parent c1e7521 commit e076644

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Tests/GRDBTests/DatabasePoolReleaseMemoryTests.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ class DatabasePoolReleaseMemoryTests: GRDBTestCase {
5858
try dbPool.read { _ in }
5959

6060
// Simulate memory warning.
61-
NotificationCenter.default.post(name: UIApplication.didReceiveMemoryWarningNotification, object: nil)
61+
NotificationCenter.default.post(
62+
name: NSNotification.Name(rawValue: "UIApplicationDidReceiveMemoryWarningNotification"),
63+
object: nil)
6264

6365
// Postcondition: reader connection was closed
6466
withExtendedLifetime(dbPool) { _ in
@@ -84,7 +86,9 @@ class DatabasePoolReleaseMemoryTests: GRDBTestCase {
8486
try dbPool.read { _ in }
8587

8688
// Simulate memory warning.
87-
NotificationCenter.default.post(name: UIApplication.didReceiveMemoryWarningNotification, object: nil)
89+
NotificationCenter.default.post(
90+
name: NSNotification.Name(rawValue: "UIApplicationDidReceiveMemoryWarningNotification"),
91+
object: nil)
8892

8993
// Postcondition: no reader connection was closed
9094
withExtendedLifetime(dbPool) { _ in
@@ -103,7 +107,9 @@ class DatabasePoolReleaseMemoryTests: GRDBTestCase {
103107
}
104108

105109
// Simulate memory warning.
106-
NotificationCenter.default.post(name: UIApplication.didReceiveMemoryWarningNotification, object: nil)
110+
NotificationCenter.default.post(
111+
name: NSNotification.Name(rawValue: "UIApplicationDidReceiveMemoryWarningNotification"),
112+
object: nil)
107113

108114
// Make sure we can read
109115
try dbPool.read { _ in }

0 commit comments

Comments
 (0)