@@ -74,11 +74,11 @@ TEST(@"-[removeLastItem]", R([mutable removeLastItem]) && mutable.count == 5 && memcmp(mutable.items, "abcde", 5) == 0) TEST(@"-[removeItemsInRange:]", - R([mutable removeItemsInRange: OFMakeRange(1, 2)]) && + R([mutable removeItemsInRange: OFRangeMake(1, 2)]) && mutable.count == 3 && memcmp(mutable.items, "ade", 3) == 0) TEST(@"-[insertItems:atIndex:count:]", R([mutable insertItems: "bc" atIndex: 1 count: 2]) && mutable.count == 5 && memcmp(mutable.items, "abcde", 5) == 0) @@ -89,51 +89,51 @@ range = [immutable rangeOfData: [OFData dataWithItems: "aa" count: 1 itemSize: 2] options: 0 - range: OFMakeRange(0, 7)]; + range: OFRangeMake(0, 7)]; TEST(@"-[rangeOfData:options:range:] #1", range.location == 0 && range.length == 1) range = [immutable rangeOfData: [OFData dataWithItems: "aa" count: 1 itemSize: 2] options: OFDataSearchBackwards - range: OFMakeRange(0, 7)]; + range: OFRangeMake(0, 7)]; TEST(@"-[rangeOfData:options:range:] #2", range.location == 5 && range.length == 1) range = [immutable rangeOfData: [OFData dataWithItems: "ac" count: 1 itemSize: 2] options: 0 - range: OFMakeRange(0, 7)]; + range: OFRangeMake(0, 7)]; TEST(@"-[rangeOfData:options:range:] #3", range.location == 2 && range.length == 1) range = [immutable rangeOfData: [OFData dataWithItems: "aabb" count: 2 itemSize: 2] options: 0 - range: OFMakeRange(0, 7)]; + range: OFRangeMake(0, 7)]; TEST(@"-[rangeOfData:options:range:] #4", range.location == 5 && range.length == 2) TEST(@"-[rangeOfData:options:range:] #5", R(range = [immutable rangeOfData: [OFData dataWithItems: "aa" count: 1 itemSize: 2] options: 0 - range: OFMakeRange(1, 6)]) && + range: OFRangeMake(1, 6)]) && range.location == 5 && range.length == 1) range = [immutable rangeOfData: [OFData dataWithItems: "aa" count: 1 itemSize: 2] options: OFDataSearchBackwards - range: OFMakeRange(0, 5)]; + range: OFRangeMake(0, 5)]; TEST(@"-[rangeOfData:options:range:] #6", range.location == 0 && range.length == 1) EXPECT_EXCEPTION( @"-[rangeOfData:options:range:] failing on different itemSize", @@ -140,37 +140,37 @@ OFInvalidArgumentException, [immutable rangeOfData: [OFData dataWithItems: "aaa" count: 1 itemSize: 3] options: 0 - range: OFMakeRange(0, 1)]) + range: OFRangeMake(0, 1)]) EXPECT_EXCEPTION( @"-[rangeOfData:options:range:] failing on out of range", OFOutOfRangeException, [immutable rangeOfData: [OFData dataWithItems: "" count: 0 itemSize: 2] options: 0 - range: OFMakeRange(8, 1)]) + range: OFRangeMake(8, 1)]) TEST(@"-[subdataWithRange:]", - [[immutable subdataWithRange: OFMakeRange(2, 4)] + [[immutable subdataWithRange: OFRangeMake(2, 4)] isEqual: [OFData dataWithItems: "accdacaa" count: 4 itemSize: 2]] && - [[mutable subdataWithRange: OFMakeRange(2, 3)] + [[mutable subdataWithRange: OFRangeMake(2, 3)] isEqual: [OFData dataWithItems: "cde" count: 3]]) EXPECT_EXCEPTION(@"-[subdataWithRange:] failing on out of range #1", OFOutOfRangeException, - [immutable subdataWithRange: OFMakeRange(7, 1)]) + [immutable subdataWithRange: OFRangeMake(7, 1)]) EXPECT_EXCEPTION(@"-[subdataWithRange:] failing on out of range #2", OFOutOfRangeException, - [mutable subdataWithRange: OFMakeRange(6, 1)]) + [mutable subdataWithRange: OFRangeMake(6, 1)]) TEST(@"-[stringByMD5Hashing]", [mutable.stringByMD5Hashing isEqual: @"ab56b4d92b40713acc5af89985d4b786"]) TEST(@"-[stringByRIPEMD160Hashing]", [mutable.stringByRIPEMD160Hashing @@ -214,13 +214,13 @@ EXPECT_EXCEPTION(@"Detect out of range in -[addItems:count:]", OFOutOfRangeException, [mutable addItems: raw[0] count: SIZE_MAX]) EXPECT_EXCEPTION(@"Detect out of range in -[removeItemsInRange:]", OFOutOfRangeException, - [mutable removeItemsInRange: OFMakeRange(mutable.count, 1)]) + [mutable removeItemsInRange: OFRangeMake(mutable.count, 1)]) free(raw[0]); free(raw[1]); objc_autoreleasePoolPop(pool); } @end