Skip to content

Commit

Permalink
Try removing unswizzling when UNSWIZZLE_AVAILABLE is false
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheard committed Nov 19, 2024
1 parent d8ec45a commit 3923bff
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions FirebasePerformance/Tests/Unit/Timer/FPRCounterListTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
#import "FirebasePerformance/Sources/Public/FirebasePerformance/FIRPerformance.h"
#import "FirebasePerformance/Sources/Timer/FPRCounterList.h"

// This test requires the UNSWIZZLE_AVAILABLE preprocessor macro to be defined in order to complete
// successfully. See FPRSelectorInstrumentor.m for more details.
#ifdef UNSWIZZLE_AVAILABLE

@interface FPRCounterListTest : XCTestCase

@end
Expand All @@ -33,14 +29,18 @@ + (void)setUp {
[super setUp];
FIRPerformance *performance = [FIRPerformance sharedInstance];
[performance setDataCollectionEnabled:YES];
#ifdef UNSWIZZLE_AVAILABLE
[[FPRClient sharedInstance] disableInstrumentation];
#endif // UNSWIZZLE_AVAILABLE
}

+ (void)tearDown {
[super tearDown];
FIRPerformance *performance = [FIRPerformance sharedInstance];
[performance setDataCollectionEnabled:NO];
#ifdef UNSWIZZLE_AVAILABLE
[[FPRClient sharedInstance] disableInstrumentation];
#endif // UNSWIZZLE_AVAILABLE
}

/** Validates counterlist object creation. */
Expand Down Expand Up @@ -166,5 +166,3 @@ - (void)testCounterInitializeWithNegativeValue {
}

@end

#endif // UNSWIZZLE_AVAILABLE

0 comments on commit 3923bff

Please sign in to comment.