summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorM.Stephen <truestyle2005@163.com>2019-07-04 18:05:12 +0800
committerM.Stephen <truestyle2005@163.com>2019-07-04 18:05:12 +0800
commit4b9a218882f805e1d8438202a1124e708d9a897f (patch)
treee9c625ae1860edc7f9ad731df9cd7b14802d7bdb
parent225f3e4c10cbf7021bfc15ee0441e831ac108458 (diff)
downloadqtlocation-mapboxgl-4b9a218882f805e1d8438202a1124e708d9a897f.tar.gz
[iOS, macOS] Test case
-rw-r--r--platform/darwin/test/MGLRendererConfigurationTests.mm14
1 files changed, 14 insertions, 0 deletions
diff --git a/platform/darwin/test/MGLRendererConfigurationTests.mm b/platform/darwin/test/MGLRendererConfigurationTests.mm
index a0c630ebb5..15505c18c1 100644
--- a/platform/darwin/test/MGLRendererConfigurationTests.mm
+++ b/platform/darwin/test/MGLRendererConfigurationTests.mm
@@ -93,4 +93,18 @@ static NSString * const MGLRendererConfigurationTests_collisionBehaviorKey = @"M
}
}
+- (void)testDefaultLocalFontFamilyName{
+ MGLRendererConfiguration *config = [[MGLRendererConfiguration alloc] init];
+ std::string localFontFamilyName = config.localFontFamilyName.value();
+
+ std::string systemFontFamilyName;
+#if TARGET_OS_IPHONE
+ systemFontFamilyName = std::string([[UIFont systemFontOfSize:0 weight:UIFontWeightRegular].familyName UTF8String]);
+#else
+ systemFontFamilyName = std::string([[NSFont systemFontOfSize:0 weight:NSFontWeightRegular].familyName UTF8String]);
+#endif
+
+ XCTAssert(localFontFamilyName == systemFontFamilyName);
+}
+
@end