Skip to content

Commit b64e0fc

Browse files
authored
Fix Firestore test build on Xcode 13 (#8575)
1 parent 6751623 commit b64e0fc

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed

Firestore/Example/Tests/Integration/API/FIRDatabaseTests.mm

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ - (void)testCannotSpecifyFieldMaskForMissingField {
379379
FIRDocumentReference *doc = [[self.db collectionWithPath:@"rooms"] documentWithAutoID];
380380

381381
XCTAssertThrowsSpecific(
382-
{ [doc setData:@{} mergeFields:@[ @"foo" ]]; }, NSException,
382+
[doc setData:@{} mergeFields:@[ @"foo" ]], NSException,
383383
@"Field 'foo' is specified in your field mask but missing from your input data.");
384384
}
385385

@@ -1280,12 +1280,9 @@ - (void)testClientCallsAfterTerminationFail {
12801280
[firestore terminateWithCompletion:[self completionForExpectationWithName:@"Terminate"]];
12811281
[self awaitExpectations];
12821282

1283-
XCTAssertThrowsSpecific(
1284-
{
1285-
[firestore disableNetworkWithCompletion:^(NSError *){
1286-
}];
1287-
},
1288-
NSException, @"The client has already been terminated.");
1283+
XCTAssertThrowsSpecific([firestore disableNetworkWithCompletion:^(NSError *){
1284+
}],
1285+
NSException, @"The client has already been terminated.");
12891286
}
12901287

12911288
- (void)testMaintainsPersistenceAfterRestarting {
@@ -1467,21 +1464,15 @@ - (void)testTerminateCanBeCalledMultipleTimes {
14671464

14681465
[firestore terminateWithCompletion:[self completionForExpectationWithName:@"Terminate1"]];
14691466
[self awaitExpectations];
1470-
XCTAssertThrowsSpecific(
1471-
{
1472-
[firestore disableNetworkWithCompletion:^(NSError *){
1473-
}];
1474-
},
1475-
NSException, @"The client has already been terminated.");
1467+
XCTAssertThrowsSpecific([firestore disableNetworkWithCompletion:^(NSError *){
1468+
}],
1469+
NSException, @"The client has already been terminated.");
14761470

14771471
[firestore terminateWithCompletion:[self completionForExpectationWithName:@"Terminate2"]];
14781472
[self awaitExpectations];
1479-
XCTAssertThrowsSpecific(
1480-
{
1481-
[firestore enableNetworkWithCompletion:^(NSError *){
1482-
}];
1483-
},
1484-
NSException, @"The client has already been terminated.");
1473+
XCTAssertThrowsSpecific([firestore enableNetworkWithCompletion:^(NSError *){
1474+
}],
1475+
NSException, @"The client has already been terminated.");
14851476
}
14861477

14871478
- (void)testCanRemoveListenerAfterTermination {

0 commit comments

Comments
 (0)