summaryrefslogtreecommitdiff
path: root/platform/ios/test
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/test')
-rw-r--r--platform/ios/test/MGLMapAccessibilityElementTests.m7
-rw-r--r--platform/ios/test/MGLNSOrthographyAdditionsTests.m8
2 files changed, 11 insertions, 4 deletions
diff --git a/platform/ios/test/MGLMapAccessibilityElementTests.m b/platform/ios/test/MGLMapAccessibilityElementTests.m
index 916461e708..65a68c90f6 100644
--- a/platform/ios/test/MGLMapAccessibilityElementTests.m
+++ b/platform/ios/test/MGLMapAccessibilityElementTests.m
@@ -25,7 +25,12 @@
@"name_en": @"Цинциннати",
};
element = [[MGLFeatureAccessibilityElement alloc] initWithAccessibilityContainer:self feature:feature];
- XCTAssertEqualObjects(element.accessibilityLabel, @"Cincinnati", @"Accessibility label should be romanized.");
+
+ if (@available(iOS 9.0, *)) {
+ XCTAssertEqualObjects(element.accessibilityLabel, @"Cincinnati", @"Accessibility label should be romanized.");
+ } else {
+ XCTAssertEqualObjects(element.accessibilityLabel, @"Цинциннати", @"Accessibility label should not be romanized.");
+ }
}
- (void)testPlaceFeatureValues {
diff --git a/platform/ios/test/MGLNSOrthographyAdditionsTests.m b/platform/ios/test/MGLNSOrthographyAdditionsTests.m
index f30553e8f6..b53cdcc918 100644
--- a/platform/ios/test/MGLNSOrthographyAdditionsTests.m
+++ b/platform/ios/test/MGLNSOrthographyAdditionsTests.m
@@ -10,9 +10,11 @@
@implementation MGLNSOrthographyAdditionsTests
- (void)testStreetsLanguages {
- for (NSString *language in [MGLVectorTileSource mapboxStreetsLanguages]) {
- NSString *dominantScript = [NSOrthography mgl_dominantScriptForMapboxStreetsLanguage:language];
- XCTAssertNotEqualObjects(dominantScript, @"Zyyy", @"Mapbox Streets languages should have dominant script");
+ if (@available(iOS 11.0, *)) {
+ for (NSString *language in [MGLVectorTileSource mapboxStreetsLanguages]) {
+ NSString *dominantScript = [NSOrthography mgl_dominantScriptForMapboxStreetsLanguage:language];
+ XCTAssertNotEqualObjects(dominantScript, @"Zyyy", @"Mapbox Streets languages should have dominant script");
+ }
}
}