Skip to content

Commit 732c1ce

Browse files
authored
[#11736] Tests Housekeeping (#11737)
1 parent c39ef81 commit 732c1ce

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

FirebaseFunctions/Tests/Integration/IntegrationTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ class IntegrationTests: XCTestCase {
559559
XCTAssertEqual(FunctionsErrorCode.outOfRange.rawValue, error.code)
560560
XCTAssertEqual("explicit nope", error.localizedDescription)
561561
XCTAssertEqual(["start": 10 as Int32, "end": 20 as Int32, "long": 30],
562-
error.userInfo["details"] as! [String: Int32])
562+
error.userInfo["details"] as? [String: Int32])
563563
expectation.fulfill()
564564
return
565565
}
@@ -591,7 +591,7 @@ class IntegrationTests: XCTestCase {
591591
XCTAssertEqual(FunctionsErrorCode.outOfRange.rawValue, error.code)
592592
XCTAssertEqual("explicit nope", error.localizedDescription)
593593
XCTAssertEqual(["start": 10 as Int32, "end": 20 as Int32, "long": 30],
594-
error.userInfo["details"] as! [String: Int32])
594+
error.userInfo["details"] as? [String: Int32])
595595
}
596596
}
597597
}

FirebaseSessions/Tests/Unit/RemoteSettingsTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ class RemoteSettingsTests: XCTestCase {
2525
"sessions_enabled": false,
2626
"sampling_rate": 0.5,
2727
"session_timeout_seconds": 10,
28-
],
28+
] as [String: Any],
2929
]
3030
let validSettings2: [String: Any] = [
3131
"cache_duration": 20,
3232
"app_quality": [
3333
"sessions_enabled": true,
3434
"sampling_rate": 0.2,
3535
"session_timeout_seconds": 20,
36-
],
36+
] as [String: Any],
3737
]
3838
let corruptedJSONString: String = "{{{{ non_key: non\"value {}"
3939
var cache: SettingsCacheClient!

FirebaseSessions/Tests/Unit/SessionsSettingsTests.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class SessionsSettingsTests: XCTestCase {
2424
"sessions_enabled": false,
2525
"sampling_rate": 0.5,
2626
"session_timeout_seconds": 10,
27-
],
27+
] as [String: Any],
2828
]
2929

3030
var cache: SettingsCacheClient!
@@ -65,8 +65,7 @@ class SessionsSettingsTests: XCTestCase {
6565
func test_NoRemoteAndDefaultsPresent_DefaultConfigsApply() {
6666
let emptySettings: [String: Any] = [
6767
"cache_duration": 10,
68-
"app_quality": [
69-
],
68+
"app_quality": [:] as [String: Any],
7069
]
7170

7271
cache.removeCache()

FirebaseSharedSwift/Tests/Codable/FirebaseDataEncoderTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class FirebaseFirebaseDataEncoderTests: XCTestCase {
268268
"weight": 79.2,
269269
],
270270
],
271-
],
271+
] as [String: Any],
272272
"id": 123,
273273
] as [String: Any]
274274

@@ -383,7 +383,7 @@ class FirebaseFirebaseDataEncoderTests: XCTestCase {
383383
func testClassHierarchy() {
384384
assertThat(SubModel(power: 100, name: "name", seconds: 123_456_789.123))
385385
.roundTrips(to: [
386-
"super": ["superPower": 100, "superName": "name"],
386+
"super": ["superPower": 100, "superName": "name"] as [String: Any],
387387
"timestamp": 123_456_789.123,
388388
])
389389
}

0 commit comments

Comments
 (0)