diff options
author | Jason Wray <jason@mapbox.com> | 2018-09-05 16:52:40 -0400 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2018-09-20 13:42:57 -0700 |
commit | 0a1b38e7f898ce46bed581e4cb4af36bcb2b3b02 (patch) | |
tree | eedf173b8e7941ff919f83e08476c656c93a2405 /platform | |
parent | 82a9295efa15e403581c4e8f96ef42789da81814 (diff) | |
download | qtlocation-mapboxgl-0a1b38e7f898ce46bed581e4cb4af36bcb2b3b02.tar.gz |
[ios, tests] Work around improper verbing of 'optional'
Diffstat (limited to 'platform')
-rw-r--r-- | platform/darwin/test/MGLStyleLayerTests.m | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/darwin/test/MGLStyleLayerTests.m b/platform/darwin/test/MGLStyleLayerTests.m index 52b36dba00..5dc97dc581 100644 --- a/platform/darwin/test/MGLStyleLayerTests.m +++ b/platform/darwin/test/MGLStyleLayerTests.m @@ -37,6 +37,13 @@ if (isBoolean) { if ([components.firstObject isEqualToString:@"is"]) { [components removeObjectAtIndex:0]; + + // Xcode 10 incorrectly classifies "optional" as a verb, so return early to avoid the verb checks. + // https://openradar.appspot.com/44149950 + if ([components.lastObject isEqualToString:@"optional"] && NSFoundationVersionNumber >= 1548) { + return; + } + if (![components.lastObject.lexicalClasses containsObject:NSLinguisticTagAdjective]) { XCTAssertTrue([components.lastObject.lexicalClasses containsObject:NSLinguisticTagVerb], @"Boolean getter %@ that starts with “is” should contain an adjective, past participle, or verb.", name); |