summaryrefslogtreecommitdiff
path: root/platform/ios/test/MGLNSOrthographyAdditionsTests.m
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2018-01-09 16:09:41 -0500
committerJason Wray <jason@mapbox.com>2018-01-10 17:26:11 -0500
commit0806e16eb390d9eb7db3157e23798f4010614aca (patch)
treee4e8a2d83ea49df8ec83b6d16e9f1c0b83a20140 /platform/ios/test/MGLNSOrthographyAdditionsTests.m
parentc9da6e495900cfe927d1f571e1687b20e0543dbd (diff)
downloadqtlocation-mapboxgl-0806e16eb390d9eb7db3157e23798f4010614aca.tar.gz
[ios] Fix and expand accessibility feature transliteration
- Fixed pre-iOS 11 compatibility. - Expanded transliteration to all supported languages.
Diffstat (limited to 'platform/ios/test/MGLNSOrthographyAdditionsTests.m')
-rw-r--r--platform/ios/test/MGLNSOrthographyAdditionsTests.m19
1 files changed, 19 insertions, 0 deletions
diff --git a/platform/ios/test/MGLNSOrthographyAdditionsTests.m b/platform/ios/test/MGLNSOrthographyAdditionsTests.m
new file mode 100644
index 0000000000..351fe4227e
--- /dev/null
+++ b/platform/ios/test/MGLNSOrthographyAdditionsTests.m
@@ -0,0 +1,19 @@
+#import <XCTest/XCTest.h>
+
+#import "NSOrthography+MGLAdditions.h"
+#import "MGLVectorSource_Private.h"
+
+@interface MGLNSOrthographyAdditionsTests : XCTestCase
+
+@end
+
+@implementation MGLNSOrthographyAdditionsTests
+
+- (void)testStreetsLanguages {
+ for (NSString *language in [MGLVectorSource mapboxStreetsLanguages]) {
+ NSString *dominantScript = [NSOrthography mgl_dominantScriptForMapboxStreetsLanguage:language];
+ XCTAssertNotEqualObjects(dominantScript, @"Zyyy", @"Mapbox Streets languages should have dominant script");
+ }
+}
+
+@end