diff options
author | Fabian Guerra Soto <fabian.guerra@mapbox.com> | 2017-09-15 17:00:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-15 17:00:54 -0400 |
commit | b2e33a452d2ccc36c5c281d2090182f1395fc1b4 (patch) | |
tree | 35b780cc47740833de1ff5590a62b5ac7746aeea /platform/darwin/test/MGLStyleTests.mm | |
parent | a6224abc33f599f0352682c411b3831b896fb97c (diff) | |
download | qtlocation-mapboxgl-b2e33a452d2ccc36c5c281d2090182f1395fc1b4.tar.gz |
[ios, macos] Deprecate trafficDayStyleURL and trafficNightStyleURL (#9918)
* [ios, macos] Deprecate trafficDayStyleURL and trafficNightStyleURL
* [ios, macos] Update changelogs.
* [ios, macos] Update trafficDayStyleURL and trafficNightStyleURL tests in MGLStyleTests.
Diffstat (limited to 'platform/darwin/test/MGLStyleTests.mm')
-rw-r--r-- | platform/darwin/test/MGLStyleTests.mm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/darwin/test/MGLStyleTests.mm b/platform/darwin/test/MGLStyleTests.mm index d93483ea6e..0814ceda2d 100644 --- a/platform/darwin/test/MGLStyleTests.mm +++ b/platform/darwin/test/MGLStyleTests.mm @@ -99,6 +99,8 @@ @(mbgl::util::default_styles::satelliteStreets.url)); XCTAssertEqualObjects([MGLStyle satelliteStreetsStyleURLWithVersion:99].absoluteString, @"mapbox://styles/mapbox/satellite-streets-v99"); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertEqualObjects([MGLStyle trafficDayStyleURLWithVersion:mbgl::util::default_styles::trafficDay.currentVersion].absoluteString, @(mbgl::util::default_styles::trafficDay.url)); XCTAssertEqualObjects([MGLStyle trafficDayStyleURLWithVersion:99].absoluteString, @@ -107,6 +109,7 @@ @(mbgl::util::default_styles::trafficNight.url)); XCTAssertEqualObjects([MGLStyle trafficNightStyleURLWithVersion:99].absoluteString, @"mapbox://styles/mapbox/traffic-night-v99"); +#pragma clang diagnostic pop static_assert(8 == mbgl::util::default_styles::numOrderedStyles, "MGLStyleTests isn’t testing all the styles in mbgl::util::default_styles."); @@ -140,7 +143,7 @@ NSString *styleHeader = self.stringWithContentsOfStyleHeader; NSError *versionedMethodError; - NSString *versionedMethodExpressionString = @(R"RE(^\+\s*\(NSURL\s*\*\s*\)\s*\w+StyleURLWithVersion\s*:\s*\(\s*NSInteger\s*\)\s*version\s*;)RE"); + NSString *versionedMethodExpressionString = @(R"RE(^\+\s*\(NSURL\s*\*\s*\)\s*\w+StyleURLWithVersion\s*:\s*\(\s*NSInteger\s*\)\s*version\s*\b)RE"); NSRegularExpression *versionedMethodExpression = [NSRegularExpression regularExpressionWithPattern:versionedMethodExpressionString options:NSRegularExpressionAnchorsMatchLines error:&versionedMethodError]; XCTAssertNil(versionedMethodError, @"Error compiling regular expression to search for versioned methods."); NSUInteger numVersionedMethodDeclarations = [versionedMethodExpression numberOfMatchesInString:styleHeader options:0 range:NSMakeRange(0, styleHeader.length)]; |