formatting

This commit is contained in:
daboe01 authored and Alexander Ljungberg committed 2014-02-12 21:57:44 +00:00
1 parent d8e4f1150e
commit a34ae45b05
1 file changed
+4 -4
+4 -4
View File
@@ -8,24 +8,24 @@ var sharedObject = [CPObject new];
- (void)testAppendToEmptyString
{
var string = [CPAttributedString new];
[string replaceCharactersInRange:CPMakeRange(0,0) withString:@"hi there"];
[string replaceCharactersInRange:CPMakeRange(0,0) withString:@"hi there"];
[self assertTrue:([string string] === @"hi there")
message:"testAppendToEmptyString: expected:" + @"hi there" + " actual:" + [string string]];
}
- (void)testAppendToEndOfString
{
var string = [[CPAttributedString alloc] initWithString:@"hi there"];
[string replaceCharactersInRange:CPMakeRange(8,0) withString:@" it is me"];
[string replaceCharactersInRange:CPMakeRange(8,0) withString:@" it is me"];
[self assertTrue:([string string] === @"hi there it is me")
message:"testAppendToEndOfString: expected:" + @"hi there it is me" + " actual:" + [string string]];
}
- (void)testWriteOverRangeBoundaries
{
var string=[[CPAttributedString alloc] initWithString:@"Fusce\n" attributes: [CPDictionary dictionaryWithObjects:[ 1 ] forKeys: ["testkey"]]]
[string replaceCharactersInRange:CPMakeRange(6, 0) withAttributedString:[[CPAttributedString alloc] initWithString:@"this is boldface"
[string replaceCharactersInRange:CPMakeRange(6, 0) withAttributedString:[[CPAttributedString alloc] initWithString:@"this is boldface"
attributes:[CPDictionary dictionaryWithObjects:[ 2 ] forKeys: ["testkey"]]]];
[string replaceCharactersInRange:CPMakeRange(5, 3) withString:@" "];
var aRange=CPMakeRange(0, 0);
var aRange=CPMakeRange(0, 0);
var attribs=[string attributesAtIndex:4 effectiveRange: aRange];
[self assertTrue:([attribs objectForKey:@"testkey"] === 1)