Skip to content

Commit

Permalink
Add unit tests for FIRGetLoggerLevel / FIRSetLoggerLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheard committed Nov 7, 2023
1 parent 141aac5 commit 71b68e1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions FirebaseCore/Tests/Unit/FIRLoggerTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,31 @@ - (void)testFIRLoggerLevelValues {
XCTAssertEqual(FIRLoggerLevelDebug, ASL_LEVEL_DEBUG);
}

- (void)testFIRGetLoggerLevel {
FIRLoggerLevel loggerLevel = FIRGetLoggerLevel();

// The default logger level is FIRLoggerLevelNotice.
XCTAssertEqual(loggerLevel, FIRLoggerLevelNotice);
}

- (void)testFIRSetLoggerLevel {
FIRSetLoggerLevel(FIRLoggerLevelDebug);

FIRLoggerLevel loggerLevel = FIRGetLoggerLevel();

// The default logger level is FIRLoggerLevelNotice.
XCTAssertEqual(loggerLevel, FIRLoggerLevelDebug);
}

- (void)testFIRResetLogger_ResetsLoggerLevel {
FIRSetLoggerLevel(FIRLoggerLevelDebug);

FIRResetLogger();
FIRLoggerLevel loggerLevel = FIRGetLoggerLevel();

// The default logger level is FIRLoggerLevelNotice.
XCTAssertEqual(loggerLevel, FIRLoggerLevelNotice);
}

@end
#endif

0 comments on commit 71b68e1

Please sign in to comment.