Repository navigation
Check for duplicate source IDs - #7203
Conversation
|
@ivovandongen, thanks for your PR! By analyzing this pull request, we identified @jfirebaugh, @boundsj and @tmpsantos to be potential reviewers. |
b256ae5 to
2406e48
Compare
There was a problem hiding this comment.
Darwin-side test for this error handling?
20fd313 to
3b64dbc
Compare
3b64dbc to
9d3d075
Compare
|
@jfirebaugh With @frederoni's help I've added unit tests for osx/ios as well. |
9d3d075 to
9fef64e
Compare
9fef64e to
401ee41
Compare
|
|
||
| [self.mapView.style addSource: source1]; | ||
|
|
||
| @try { |
There was a problem hiding this comment.
FYI, @try-@catch blocks are generally to be avoided in Objective-C code due to their poor performance. (At least the performance is poor when used the way try-catch blocks are used in C++ for flow control.) It’s technically necessary here because we’re trying to detect an exception being raised. However, the more idiomatic way to assert for the exception is to use the XCTAssertThrows(), XCTAssertThrowsSpecific(), or XCTAssertThrowsSpecificNamed() macro.
There was a problem hiding this comment.
I think that once this change is merged into the iOS release branch it might make more sense to do these tests in MGLStyleTests along with what has been added in https://github.com/mapbox/mapbox-gl-native/pull/7272/files#diff-ce3b7fe93109fd552f9627d0dcc0ceb4R107 for checking for duplicate instances.
Fixes #7011