Files
react-native/RNTester/RNTesterUnitTests/RCTPerformanceLoggerTests.m
T
Kyle Fang 5d3d3987d8 - fix crash on performance logger (#24821)
Summary:
Fix Issue https://github.com/facebook/react-native/issues/24820

It's caused by `_labelsForTags` and `RCTPLTag` being out of sync, the crash might only be one of the issues that this bug was causing.

## Changelog

[iOS] [Fixed] - fix crash on performance logger
Pull Request resolved: https://github.com/facebook/react-native/pull/24821

Differential Revision: D15407291

Pulled By: PeteTheHeat

fbshipit-source-id: c8d2a047fceb9cec981c48fe5181d1b4cbf0976c
2019-05-18 08:36:15 -07:00

26 lines
540 B
Objective-C

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
#import <React/RCTPerformanceLogger.h>
#import <XCTest/XCTest.h>
@interface RCTPerformanceLoggerTests : XCTestCase
@end
@implementation RCTPerformanceLoggerTests
- (void)testLabelCountInSyncWithRCTPLTag
{
RCTPerformanceLogger *logger = [[RCTPerformanceLogger alloc] init];
XCTAssertEqual([logger labelsForTags].count, RCTPLSize);
}
@end