STAssertTrue([output isKindOfClass:[NSString class]], @"Coercion to NSString must result in an NSString; instead, it resulted in an %@", [output class]);
STAssertEqualObjects(output, input, @"Coercion must not change the object's value");
}
- (void)testMutableAttributedStringToPlainText {
NSString *str = @"The quack is strong with this one.";
STAssertTrue([output isKindOfClass:[NSString class]], @"Coercion to NSString must result in an NSString; instead, it resulted in an %@", [output class]);
STAssertEqualObjects(output, input, @"Coercion must not change the object's value");
STAssertTrue([output isKindOfClass:destClass], @"Coercion to %@ must result in an %@; instead, it resulted in an %@", destClass, destClass, [output class]);
STAssertEqualObjects(output, input, @"Coercion must not change the object's value");
}
- (void)testPlainTextToMutableAttributedString {
NSString *str = @"More fun than a bag of chips.";
Class destClass = [NSMutableAttributedString class];
STAssertTrue([output isKindOfClass:destClass], @"Coercion to %@ must result in an %@; instead, it resulted in an %@", destClass, destClass, [output class]);
STAssertEqualObjects(output, input, @"Coercion must not change the object's value");
NSAttributedString *replacement = [[[NSAttributedString alloc] initWithString:@" (one of the slogans from the old Adium X site)" attributes:attrs] autorelease];
STAssertTrue([output isKindOfClass:[NSString class]], @"Coercion to NSString must result in an NSString; instead, it resulted in an %@", [output class]);
STAssertEqualObjects(output, str, @"Coercion must not change the object's value");
}
*/
-(void)testTextStorageToPlainTextWithMutations{
NSString*str=@"The only IM client with duck 'n' cover.";
NSAttributedString*replacement=[[[NSAttributedStringalloc]initWithString:@" (one of the slogans from the old Adium X site)"attributes:attrs]autorelease];