Fix attribute value setting in testLinkInTextUsesForegroundColor in ASTextKitTests

This commit is contained in:
Samuel Hsiung 2016-01-27 23:51:44 -08:00
parent e22c50101a
commit 8c963bd13c

View File

@ -148,7 +148,7 @@ static BOOL checkAttributes(const ASTextKitAttributes &attributes, const CGSize
// so we have to choose a style and color and match it in the text kit version
// for this test
NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle),
NSUnderlineColorAttributeName: [UIColor redColor],
NSUnderlineColorAttributeName: [UIColor blueColor],
};
NSDictionary *textAttributes = @{NSFontAttributeName : [UIFont systemFontOfSize:12],
};
@ -165,7 +165,7 @@ static BOOL checkAttributes(const ASTextKitAttributes &attributes, const CGSize
for (NSString *attributeName in linkTextAttributes.keyEnumerator) {
[attrStr addAttribute:attributeName
value:linkTextAttributes[NSUnderlineStyleAttributeName]
value:linkTextAttributes[attributeName]
range:selectedRange];
}