Skip to content

Commit 0d40135

Browse files
authored
[Infra] Fix Swift 6 warning in FirebaseAppTests.swift (#13627)
1 parent b8ef6d7 commit 0d40135

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

FirebaseCore/Tests/SwiftUnit/FirebaseAppTests.swift

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -340,22 +340,20 @@ class FirebaseAppTests: XCTestCase {
340340
// MARK: - Helpers
341341

342342
private func expectAppConfigurationNotification(appName: String, isDefaultApp: Bool) {
343-
let expectedUserInfo: NSDictionary = [
343+
let expectedUserInfo: [String: Any] = [
344344
"FIRAppNameKey": appName,
345345
"FIRAppIsDefaultAppKey": NSNumber(value: isDefaultApp),
346346
"FIRGoogleAppIDKey": Constants.Options.googleAppID,
347347
]
348348

349349
expectation(forNotification: NSNotification.Name.firAppReadyToConfigureSDK,
350350
object: FirebaseApp.self, handler: { notification -> Bool in
351-
if let userInfo = notification.userInfo {
352-
if expectedUserInfo.isEqual(to: userInfo) {
353-
return true
354-
}
355-
} else {
351+
guard let userInfo = notification.userInfo else {
356352
XCTFail("Failed to unwrap notification user info")
353+
return false
357354
}
358-
return false
355+
return NSDictionary(dictionary: expectedUserInfo) ==
356+
NSDictionary(dictionary: userInfo)
359357
})
360358
}
361359
}

0 commit comments

Comments
 (0)