Permalink
Browse files

Tabs to spaces:

for i in `find **/*.h **/*.m`; do echo "Expanding $i" && expand -t 2
  $i >$i.tmp && mv $i.tmp $i; done
  • Loading branch information...
1 parent 5c49817 commit e771172e81a223cbdf8f98de8d1b504ac0a7eb7a @gabriel gabriel committed Apr 15, 2010
Showing with 1,387 additions and 1,387 deletions.
  1. +3 −3 Classes-IPhone/GHUnitIPhoneAppDelegate.h
  2. +10 −10 Classes-IPhone/GHUnitIPhoneAppDelegate.m
  3. +1 −1 Classes-IPhone/GHUnitIPhoneTableViewDataSource.h
  4. +50 −50 Classes-IPhone/GHUnitIPhoneTableViewDataSource.m
  5. +41 −41 Classes-IPhone/GHUnitIPhoneTestMain.m
  6. +1 −1 Classes-IPhone/GHUnitIPhoneTestViewController.h
  7. +20 −20 Classes-IPhone/GHUnitIPhoneTestViewController.m
  8. +8 −8 Classes-IPhone/GHUnitIPhoneView.h
  9. +1 −1 Classes-IPhone/GHUnitIPhoneView.m
  10. +9 −9 Classes-IPhone/GHUnitIPhoneViewController.h
  11. +73 −73 Classes-IPhone/GHUnitIPhoneViewController.m
  12. +48 −48 Classes-MacOSX/GHUnitTestMain.m
  13. +24 −24 Classes/GHAsyncTestCase.h
  14. +90 −90 Classes/GHAsyncTestCase.m
  15. +25 −25 Classes/GHTest.h
  16. +118 −118 Classes/GHTest.m
  17. +3 −3 Classes/GHTestCase.h
  18. +3 −3 Classes/GHTestCase.m
  19. +18 −18 Classes/GHTestGroup.h
  20. +168 −168 Classes/GHTestGroup.m
  21. +10 −10 Classes/GHTestRunner.h
  22. +109 −109 Classes/GHTestRunner.m
  23. +6 −6 Classes/GHTestSuite.h
  24. +71 −71 Classes/GHTestSuite.m
  25. +3 −3 Classes/GHTesting.h
  26. +128 −128 Classes/GHTesting.m
  27. +117 −117 Classes/NSException+GHTestFailureExceptions.m
  28. +86 −86 Classes/NSValue+GHValueFormatter.m
  29. +32 −32 Tests/GHAsyncTestCaseTest.m
  30. +1 −1 Tests/GHGTMTestCaseTest.m
  31. +35 −35 Tests/GHMockNSURLConnectionTest.m
  32. +3 −3 Tests/GHNSLocaleMockTest.m
  33. +8 −8 Tests/GHSenTestingTest.m
  34. +26 −26 Tests/GHSetUpTearDownTest.m
  35. +1 −1 Tests/GHSlowTest.m
  36. +8 −8 Tests/GHTestFail.m
  37. +9 −9 Tests/GHTestLogTest.m
  38. +6 −6 Tests/GHTestMacrosTest.m
  39. +14 −14 Tests/GHTestOnMainThread.m
@@ -30,9 +30,9 @@
#import <UIKit/UIKit.h>
@interface GHUnitIPhoneAppDelegate : NSObject <UIApplicationDelegate> {
- UIWindow *window_;
-
- UINavigationController *navigationController_;
+ UIWindow *window_;
+
+ UINavigationController *navigationController_;
}
@end
@@ -33,15 +33,15 @@
@implementation GHUnitIPhoneAppDelegate
- (void)applicationDidFinishLaunching:(UIApplication *)application {
- GHUnitIPhoneViewController *viewController = [[GHUnitIPhoneViewController alloc] init];
+ GHUnitIPhoneViewController *viewController = [[GHUnitIPhoneViewController alloc] init];
[viewController loadDefaults];
- navigationController_ = [[UINavigationController alloc] initWithRootViewController:viewController];
+ navigationController_ = [[UINavigationController alloc] initWithRootViewController:viewController];
[viewController release];
- CGSize size = [[UIScreen mainScreen] bounds].size;
- window_ = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height)];
- GHUDebug(@"Setting window view");
- [window_ addSubview:navigationController_.view];
- [window_ makeKeyAndVisible];
+ CGSize size = [[UIScreen mainScreen] bounds].size;
+ window_ = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height)];
+ GHUDebug(@"Setting window view");
+ [window_ addSubview:navigationController_.view];
+ [window_ makeKeyAndVisible];
if (getenv("GHUNIT_AUTORUN")) [viewController runTests];
}
@@ -52,9 +52,9 @@ - (void)applicationWillTerminate:(UIApplication *)application {
}
- (void)dealloc {
- [navigationController_ release];
- [window_ release];
- [super dealloc];
+ [navigationController_ release];
+ [window_ release];
+ [super dealloc];
}
@end
@@ -30,7 +30,7 @@
#import "GHTestViewModel.h"
@interface GHUnitIPhoneTableViewDataSource : GHTestViewModel <UITableViewDataSource> {
-
+
}
- (GHTestNode *)nodeForIndexPath:(NSIndexPath *)indexPath;
@@ -32,75 +32,75 @@
@implementation GHUnitIPhoneTableViewDataSource
- (GHTestNode *)nodeForIndexPath:(NSIndexPath *)indexPath {
- GHTestNode *sectionNode = [[[self root] children] objectAtIndex:indexPath.section];
- return [[sectionNode children] objectAtIndex:indexPath.row];
+ GHTestNode *sectionNode = [[[self root] children] objectAtIndex:indexPath.section];
+ return [[sectionNode children] objectAtIndex:indexPath.row];
}
- (void)setSelectedForAllNodes:(BOOL)selected {
- for(GHTestNode *sectionNode in [[self root] children]) {
- for(GHTestNode *node in [sectionNode children]) {
- [node setSelected:selected];
- }
- }
+ for(GHTestNode *sectionNode in [[self root] children]) {
+ for(GHTestNode *node in [sectionNode children]) {
+ [node setSelected:selected];
+ }
+ }
}
#pragma mark Data Source (UITableView)
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
- NSInteger numberOfSections = [self numberOfGroups];
- if (numberOfSections > 0) return numberOfSections;
- return 1;
+ NSInteger numberOfSections = [self numberOfGroups];
+ if (numberOfSections > 0) return numberOfSections;
+ return 1;
}
- (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section {
- return [self numberOfTestsInGroup:section];
+ return [self numberOfTestsInGroup:section];
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
- NSArray *children = [[self root] children];
- if ([children count] == 0) return nil;
- GHTestNode *sectionNode = [children objectAtIndex:section];
- return sectionNode.name;
+ NSArray *children = [[self root] children];
+ if ([children count] == 0) return nil;
+ GHTestNode *sectionNode = [children objectAtIndex:section];
+ return sectionNode.name;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- GHTestNode *sectionNode = [[[self root] children] objectAtIndex:indexPath.section];
- GHTestNode *node = [[sectionNode children] objectAtIndex:indexPath.row];
-
- static NSString *CellIdentifier = @"ReviewFeedViewItem";
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (!cell)
- cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
-
- if (editing_) {
- cell.textLabel.text = node.name;
- } else {
- cell.textLabel.text = [NSString stringWithFormat:@"%@ %@", node.name, node.statusString];
- }
+ GHTestNode *sectionNode = [[[self root] children] objectAtIndex:indexPath.section];
+ GHTestNode *node = [[sectionNode children] objectAtIndex:indexPath.row];
+
+ static NSString *CellIdentifier = @"ReviewFeedViewItem";
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+ if (!cell)
+ cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
+
+ if (editing_) {
+ cell.textLabel.text = node.name;
+ } else {
+ cell.textLabel.text = [NSString stringWithFormat:@"%@ %@", node.name, node.statusString];
+ }
- cell.textLabel.textColor = [UIColor lightGrayColor];
+ cell.textLabel.textColor = [UIColor lightGrayColor];
cell.textLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:14];
-
- if (editing_) {
- if (node.isSelected) cell.textLabel.textColor = [UIColor blackColor];
- } else {
- if ([node status] == GHTestStatusRunning) {
- cell.textLabel.textColor = [UIColor blackColor];
- } else if ([node status] == GHTestStatusErrored) {
- cell.textLabel.textColor = [UIColor redColor];
- } else if ([node status] == GHTestStatusSucceeded) {
- cell.textLabel.textColor = [UIColor blackColor];
- } else if (node.isSelected) {
- if (node.isSelected) cell.textLabel.textColor = [UIColor darkGrayColor];
- }
- }
-
- UITableViewCellAccessoryType accessoryType = UITableViewCellAccessoryNone;
- if (self.isEditing && node.isSelected) accessoryType = UITableViewCellAccessoryCheckmark;
- else if (node.isEnded) accessoryType = UITableViewCellAccessoryDisclosureIndicator;
- cell.accessoryType = accessoryType;
-
- return cell;
+
+ if (editing_) {
+ if (node.isSelected) cell.textLabel.textColor = [UIColor blackColor];
+ } else {
+ if ([node status] == GHTestStatusRunning) {
+ cell.textLabel.textColor = [UIColor blackColor];
+ } else if ([node status] == GHTestStatusErrored) {
+ cell.textLabel.textColor = [UIColor redColor];
+ } else if ([node status] == GHTestStatusSucceeded) {
+ cell.textLabel.textColor = [UIColor blackColor];
+ } else if (node.isSelected) {
+ if (node.isSelected) cell.textLabel.textColor = [UIColor darkGrayColor];
+ }
+ }
+
+ UITableViewCellAccessoryType accessoryType = UITableViewCellAccessoryNone;
+ if (self.isEditing && node.isSelected) accessoryType = UITableViewCellAccessoryCheckmark;
+ else if (node.isEnded) accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+ cell.accessoryType = accessoryType;
+
+ return cell;
}
@end
@@ -33,48 +33,48 @@
#import "GHTesting.h"
// Default exception handler
-void exceptionHandler(NSException *exception) {
- NSLog(@"%@\n%@", [exception reason], GHUStackTraceFromException(exception));
+void exceptionHandler(NSException *exception) {
+ NSLog(@"%@\n%@", [exception reason], GHUStackTraceFromException(exception));
}
int main(int argc, char *argv[]) {
-
- /*!
- For debugging:
- Go into the "Get Info" contextual menu of your (test) executable (inside the "Executables" group in the left panel of XCode).
- Then go in the "Arguments" tab. You can add the following environment variables:
-
- Default: Set to:
- NSDebugEnabled NO "YES"
- NSZombieEnabled NO "YES"
- NSDeallocateZombies NO "YES"
- NSHangOnUncaughtException NO "YES"
-
- NSEnableAutoreleasePool YES "NO"
- NSAutoreleaseFreedObjectCheckEnabled NO "YES"
- NSAutoreleaseHighWaterMark 0 non-negative integer
- NSAutoreleaseHighWaterResolution 0 non-negative integer
-
- For info on these varaiables see NSDebug.h; http://theshadow.uw.hu/iPhoneSDKdoc/Foundation.framework/NSDebug.h.html
-
- For malloc debugging see: http://developer.apple.com/mac/library/documentation/Performance/Conceptual/ManagingMemory/Articles/MallocDebug.html
- */
-
- NSSetUncaughtExceptionHandler(&exceptionHandler);
-
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
- // Register any special test case classes
- //[[GHTesting sharedInstance] registerClassName:@"GHSpecialTestCase"];
-
- int retVal = 0;
- // If GHUNIT_CLI is set we are using the command line interface and run the tests
- // Otherwise load the GUI app
- if (getenv("GHUNIT_CLI")) {
- retVal = [GHTestRunner run];
- } else {
- retVal = UIApplicationMain(argc, argv, nil, @"GHUnitIPhoneAppDelegate");
- }
- [pool release];
- return retVal;
+
+ /*!
+ For debugging:
+ Go into the "Get Info" contextual menu of your (test) executable (inside the "Executables" group in the left panel of XCode).
+ Then go in the "Arguments" tab. You can add the following environment variables:
+
+ Default: Set to:
+ NSDebugEnabled NO "YES"
+ NSZombieEnabled NO "YES"
+ NSDeallocateZombies NO "YES"
+ NSHangOnUncaughtException NO "YES"
+
+ NSEnableAutoreleasePool YES "NO"
+ NSAutoreleaseFreedObjectCheckEnabled NO "YES"
+ NSAutoreleaseHighWaterMark 0 non-negative integer
+ NSAutoreleaseHighWaterResolution 0 non-negative integer
+
+ For info on these varaiables see NSDebug.h; http://theshadow.uw.hu/iPhoneSDKdoc/Foundation.framework/NSDebug.h.html
+
+ For malloc debugging see: http://developer.apple.com/mac/library/documentation/Performance/Conceptual/ManagingMemory/Articles/MallocDebug.html
+ */
+
+ NSSetUncaughtExceptionHandler(&exceptionHandler);
+
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ // Register any special test case classes
+ //[[GHTesting sharedInstance] registerClassName:@"GHSpecialTestCase"];
+
+ int retVal = 0;
+ // If GHUNIT_CLI is set we are using the command line interface and run the tests
+ // Otherwise load the GUI app
+ if (getenv("GHUNIT_CLI")) {
+ retVal = [GHTestRunner run];
+ } else {
+ retVal = UIApplicationMain(argc, argv, nil, @"GHUnitIPhoneAppDelegate");
+ }
+ [pool release];
+ return retVal;
}
@@ -30,7 +30,7 @@
#import "GHTestViewModel.h"
@interface GHUnitIPhoneTestViewController : UIViewController <GHTestRunnerDelegate> {
- UITextView *textView_;
+ UITextView *textView_;
GHTestNode *testNode_;
@@ -43,28 +43,28 @@ - (id)init {
}
- (void)dealloc {
- [testNode_ release];
- [super dealloc];
+ [testNode_ release];
+ [super dealloc];
}
-- (void)loadView {
- textView_ = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
- textView_.font = [UIFont fontWithName:@"Courier New-Bold" size:12];
- textView_.backgroundColor = [UIColor colorWithWhite:0.96 alpha:1.0];
- textView_.textColor = [UIColor blackColor];
- textView_.editable = NO;
- textView_.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
- textView_.showsHorizontalScrollIndicator = YES;
- textView_.showsVerticalScrollIndicator = YES;
- textView_.indicatorStyle = UIScrollViewIndicatorStyleWhite;
- textView_.contentSize = CGSizeMake(10000, 10000);
- textView_.scrollEnabled = YES;
- self.view = textView_;
- [textView_ release]; // Retained by self.view
+- (void)loadView {
+ textView_ = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
+ textView_.font = [UIFont fontWithName:@"Courier New-Bold" size:12];
+ textView_.backgroundColor = [UIColor colorWithWhite:0.96 alpha:1.0];
+ textView_.textColor = [UIColor blackColor];
+ textView_.editable = NO;
+ textView_.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
+ textView_.showsHorizontalScrollIndicator = YES;
+ textView_.showsVerticalScrollIndicator = YES;
+ textView_.indicatorStyle = UIScrollViewIndicatorStyleWhite;
+ textView_.contentSize = CGSizeMake(10000, 10000);
+ textView_.scrollEnabled = YES;
+ self.view = textView_;
+ [textView_ release]; // Retained by self.view
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
- return YES;
+ return YES;
}
- (void)_runTest {
@@ -83,16 +83,16 @@ - (NSString *)updateTestView {
if (log) [text appendFormat:@"\nLog:\n%@\n", log];
NSString *stackTrace = [testNode_ stackTrace];
if (stackTrace) [text appendFormat:@"\n%@\n", stackTrace];
- textView_.text = text;
+ textView_.text = text;
return text;
}
- (void)setTest:(id<GHTest>)test {
self.view;
self.title = [test name];
- [testNode_ release];
- testNode_ = [[GHTestNode nodeWithTest:test children:nil source:nil] retain];
+ [testNode_ release];
+ testNode_ = [[GHTestNode nodeWithTest:test children:nil source:nil] retain];
NSString *text = [self updateTestView];
NSLog(@"%@", text);
}
@@ -29,23 +29,23 @@
@interface GHUnitIPhoneView : UIView {
- UISearchBar *searchBar_;
-
- UITableView *tableView_;
-
- //! Status label at bottom of the view
- UILabel *statusLabel_;
+ UISearchBar *searchBar_;
+
+ UITableView *tableView_;
+
+ //! Status label at bottom of the view
+ UILabel *statusLabel_;
UISegmentedControl *filterControl_;
-
+
UIToolbar *runToolbar_;
UIView *footerView_;
}
@property (readonly, nonatomic) UILabel *statusLabel;
@property (readonly, nonatomic) UISegmentedControl *filterControl;
-@property (readonly, nonatomic) UISearchBar *searchBar;
+@property (readonly, nonatomic) UISearchBar *searchBar;
@property (readonly, nonatomic) UITableView *tableView;
@@ -48,7 +48,7 @@ - (id)initWithFrame:(CGRect)frame {
tableView_ = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
tableView_.sectionIndexMinimumDisplayRowCount = 5;
[self addSubview:tableView_];
- [tableView_ release];
+ [tableView_ release];
footerView_ = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 36)];
footerView_.backgroundColor = [UIColor colorWithWhite:0.9 alpha:1.0];
Oops, something went wrong.

0 comments on commit e771172

Please sign in to comment.