File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
FirebasePerformance/Tests/Unit Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ - (void)testForegroundTracking {
3939/* * Validates if the foreground & background state is captured correctly. */
4040- (void )testBackgroundTracking {
4141 XCTestExpectation *expectation = [self expectationWithDescription: @" Application state change" ];
42-
42+
4343 FPRTraceBackgroundActivityTracker *tracker = [[FPRTraceBackgroundActivityTracker alloc ] init ];
4444 NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter ];
4545 dispatch_async (dispatch_get_main_queue (), ^{
@@ -49,14 +49,16 @@ - (void)testBackgroundTracking {
4949 object: [UIApplication sharedApplication ]];
5050 [expectation fulfill ];
5151 });
52-
53- [self waitForExpectationsWithTimeout: 5.0 handler: ^(NSError * _Nullable error) {
54- if (error) {
55- XCTFail (@" Expectation failed with error: %@ " , error);
56- } else {
57- XCTAssertEqual (tracker.traceBackgroundState , FPRTraceStateBackgroundAndForeground);
58- }
59- }];
52+
53+ [self waitForExpectationsWithTimeout: 5.0
54+ handler: ^(NSError *_Nullable error) {
55+ if (error) {
56+ XCTFail (@" Expectation failed with error: %@ " , error);
57+ } else {
58+ XCTAssertEqual (tracker.traceBackgroundState ,
59+ FPRTraceStateBackgroundAndForeground);
60+ }
61+ }];
6062}
6163
6264@end
You can’t perform that action at this time.
0 commit comments