-
Notifications
You must be signed in to change notification settings - Fork 122
Add Logging level tests (and vararg version of logCallingFunction) #373
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But I left a question and requires commented code cleanup.
MGLLogDebug(format); | ||
#pragma clang diagnostic push | ||
#pragma clang diagnostic ignored "-Wdeprecated-implementations" | ||
// TODO: Remove in future release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we removing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To bypass a catch-22; I marked the protocol methods as deprecated, and so the compiler warns (errors) if you add them. But if they're missing then the compiler errors about an incomplete conformance. 🤕
- (void)testLoggingLevelInfo { | ||
[self internalTestLoggingLevel:MGLLoggingLevelInfo | ||
expectingLogForLevels:@[ | ||
// @(MGLLoggingLevelDebug), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: please remove commented code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tempted to leave for the moment, as in this case it's kinda documentation when seen alongside the other tests.
This PR adds unit tests as a part of: #370
See gl-native for the associated fix for #370 (which uses
Log::Observer
instead of calling down to-[MGLNetworkConfiguration debugLog:]
etc).Fixes #347 (along with next gl-native release)
Fixes mapbox/mapbox-gl-native#16511