Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Force attribution, title-casing tests to pass #13387

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion platform/darwin/test/MGLNSStringAdditionsTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ @interface MGLNSStringAdditionsTests : XCTestCase
@implementation MGLNSStringAdditionsTests

- (void)testTitleCasedString {
NSLocale *locale = [NSLocale currentLocale];
NSLocale *locale = [NSLocale localeWithLocaleIdentifier:@"en-US"];

XCTAssertEqualObjects([@"© OpenStreetMap" mgl_titleCasedStringWithLocale:locale], @"© OpenStreetMap");
XCTAssertEqualObjects([@"© OSM" mgl_titleCasedStringWithLocale:locale], @"© OSM");
Expand Down
9 changes: 5 additions & 4 deletions platform/darwin/test/MGLTileSetTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ - (void)testTileSetFromTileURLTemplates {
#if TARGET_OS_IPHONE
UIColor *redColor = [UIColor redColor];
#else
// CSS uses the sRGB color space. In macOS 10.12 Sierra and below,
// -[NSColor redColor] is in the calibrated RGB space and has a slightly
// different sRGB value than on iOS and macOS 10.13 High Sierra.
NSColor *redColor = [NSColor colorWithSRGBRed:1 green:0 blue:0 alpha:1];
// CSS uses the sRGB color space.
// AppKit incorrectly uses calibrated RGB when exporting HTML, so input
// calibrated RGB to ensure round-tripping.
// <rdar://problem/46115233> <http://www.openradar.me/46115233>
NSColor *redColor = [NSColor colorWithCalibratedRed:1 green:0 blue:0 alpha:1];
#endif
NSAttributedString *gl = [[NSAttributedString alloc] initWithString:@"GL" attributes:@{
NSBackgroundColorAttributeName: redColor,
Expand Down