Created
November 18, 2011 10:43
-
-
Save jamztang/1376132 to your computer and use it in GitHub Desktop.
Google+ Style Album
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define MAX_HEIGHT 100 | |
#define MAX_WIDTH 310 | |
#define BORDER_WIDTH 5 | |
- (NSArray *)resultingArrayWithArray:(NSArray *)originalArray { | |
NSMutableArray *rootArray = [NSMutableArray array]; | |
for (NSValue *value in originalArray) { | |
// Missing part | |
} | |
return originalArray; | |
} | |
- (void)testSizeSplit { | |
NSArray *sizeArray = [NSArray arrayWithObjects: | |
[NSValue valueWithCGSize:CGSizeMake(310, 100)], | |
[NSValue valueWithCGSize:CGSizeMake(100, 100)], | |
[NSValue valueWithCGSize:CGSizeMake(100, 100)], | |
[NSValue valueWithCGSize:CGSizeMake(100, 100)], | |
nil]; | |
NSArray *expectedArray = [NSArray arrayWithObjects: | |
[NSArray arrayWithObjects: | |
[NSValue valueWithCGSize:CGSizeMake(310, 100)], | |
nil], | |
[NSArray arrayWithObjects: | |
[NSValue valueWithCGSize:CGSizeMake(100, 100)], | |
[NSValue valueWithCGSize:CGSizeMake(100, 100)], | |
[NSValue valueWithCGSize:CGSizeMake(100, 100)], | |
nil], | |
nil]; | |
NSArray *resultingArray = [self resultingArrayWithArray:sizeArray]; | |
STAssertEqualObjects(resultingArray, expectedArray, nil, nil); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment