Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor formatting cleanup

  • Loading branch information...
commit 59ad359f4efdbf9b420304046298d6da7d9baee2 1 parent 7463a0d
Adam Milligan authored
View
4 Source/CDRFunctions.m
@@ -115,7 +115,9 @@ void CDRDefineGlobalBeforeAndAfterEachBlocks() {
for (NSString *className in specClassNames) {
Class specClass = NSClassFromString(className);
- if (specClass) [specClassesToRun addObject:specClass];
+ if (specClass) {
+ [specClassesToRun addObject:specClass];
+ }
}
return [[specClassesToRun copy] autorelease];
}
View
10 Source/ReporterHelpers/CDRSlowTestStatistics.m
@@ -30,19 +30,19 @@ - (void)dealloc {
- (NSString *)formattedDescription {
NSString *timeString = [NSString stringWithFormat:@"%7.3fs | ", self.runTime];
NSString *newLinePrefix = [NSString stringWithFormat:@"\n | "];
-
+
NSArray *titleChunks = [self.title componentsSeparatedByString:@" "];
NSMutableArray *lines = [NSMutableArray array];
NSMutableArray *currentLine = [NSMutableArray array];
int currentLineLength = 0;
-
+
for (NSString *titleChunk in titleChunks) {
if (currentLineLength > 0 && (titleChunk.length + 1 + currentLineLength > 70)) {
[lines addObject:[currentLine componentsJoinedByString:@" "]];
currentLine = [NSMutableArray array];
currentLineLength = 0;
}
-
+
[currentLine addObject:titleChunk];
currentLineLength += titleChunk.length + 1;
}
@@ -60,6 +60,7 @@ - (NSComparisonResult)compare:(CDRRunTimeTitlePair *)otherPair {
}
return NSOrderedSame;
}
+
@end
@interface CDRSlowTestStatistics ()
@@ -93,7 +94,7 @@ - (void)printStatsForExampleGroups:(NSArray *)groups {
NSArray *sortedRootPairs = [[[rootPairs sortedArrayUsingSelector:@selector(compare:)] reverseObjectEnumerator] allObjects];
sortedRootPairs = [sortedRootPairs subarrayWithRange:NSMakeRange(0, MIN(numberOfResultsToShow, sortedRootPairs.count))];
- NSArray *sortedExamplePairs = [[[examplePairs sortedArrayUsingSelector:@selector(compare:)] reverseObjectEnumerator] allObjects];
+ NSArray *sortedExamplePairs = [[[examplePairs sortedArrayUsingSelector:@selector(compare:)] reverseObjectEnumerator] allObjects];
sortedExamplePairs = [sortedExamplePairs subarrayWithRange:NSMakeRange(0, MIN(numberOfResultsToShow, sortedExamplePairs.count))];
printf("\n%d Slowest Tests\n\n", (int)sortedExamplePairs.count);
@@ -121,4 +122,5 @@ - (NSArray *)runTimeTitlePairsForGroup:(CDRExampleGroup *)group {
}
return pairs;
}
+
@end
Please sign in to comment.
Something went wrong with that request. Please try again.