Permalink
Browse files

Updated GHUnit to latest version from GitHub.

  • Loading branch information...
1 parent d444aaf commit 568d5d695950300da3e34afb7c7041863466a1eb @tomaz committed Apr 17, 2010
Showing with 1,239 additions and 1,198 deletions.
  1. +7 −0 ...n/Cocoa Application/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/CHANGELOG.md
  2. +48 −48 .../Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes-MacOSX/GHUnitTestMain.m
  3. +24 −24 ...cation/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/GHAsyncTestCase.h
  4. +90 −90 ...cation/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/GHAsyncTestCase.m
  5. +25 −25 ...coa Application/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/GHTest.h
  6. +118 −118 ...coa Application/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/GHTest.m
  7. +3 −3 ...Application/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/GHTestCase.h
  8. +3 −3 ...Application/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/GHTestCase.m
  9. +18 −18 ...pplication/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/GHTestGroup.h
  10. +168 −168 ...pplication/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/GHTestGroup.m
  11. +10 −10 ...plication/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/GHTestRunner.h
  12. +109 −109 ...plication/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/GHTestRunner.m
  13. +6 −6 ...pplication/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/GHTestSuite.h
  14. +71 −71 ...pplication/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/GHTestSuite.m
  15. +3 −3 ... Application/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/GHTesting.h
  16. +128 −128 ... Application/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/GHTesting.m
  17. +1 −1 ...n/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/Mock/GHNSLocale+Mock.m
  18. +117 −117 ...lication with Unit Testing/Common/ThirdParty/GHUnit/Classes/NSException+GHTestFailureExceptions.m
  19. +86 −86 ...re Data Application with Unit Testing/Common/ThirdParty/GHUnit/Classes/NSValue+GHValueFormatter.m
  20. +8 −1 ...ocoa Application/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/HUDSON-HOWTO.md
  21. +19 −9 ...tion/Cocoa Application/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/README.md
  22. +1 −1 ...plication/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Scripts/CombineLibs.sh
  23. +32 −32 ...tion/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Tests/GHAsyncTestCaseTest.m
  24. +1 −1 ...cation/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Tests/GHGTMTestCaseTest.m
  25. +35 −35 ...ore Data Application with Unit Testing/Common/ThirdParty/GHUnit/Tests/GHMockNSURLConnectionTest.m
  26. +3 −3 ...ation/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Tests/GHNSLocaleMockTest.m
  27. +8 −8 ...ication/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Tests/GHSenTestingTest.m
  28. +26 −26 ...tion/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Tests/GHSetUpTearDownTest.m
  29. +1 −1 ...a Application/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Tests/GHSlowTest.m
  30. +1 −1 ... Application/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Tests/GHTestEmpty.m
  31. +8 −8 ...a Application/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Tests/GHTestFail.m
  32. +10 −10 ...pplication/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Tests/GHTestLogTest.m
  33. +7 −7 ...ication/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Tests/GHTestMacrosTest.m
  34. +14 −14 ...ation/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/Tests/GHTestOnMainThread.m
  35. +24 −0 ...Application with Unit Testing/Common/ThirdParty/GHUnit/Tests/IPhone/GHMockCLLocationManagerTest.m
  36. +0 −8 ...re Data Application with Unit Testing/Common/ThirdParty/GHUnit/XcodeConfig/Shared-IPhone.xcconfig
  37. +4 −3 ...tion/Core Data Application with Unit Testing/Common/ThirdParty/GHUnit/XcodeConfig/Shared.xcconfig
  38. +2 −2 ...s/Application/Cocoa Application/Core Data Application/___PROJECTNAME___.xcodeproj/project.pbxproj
@@ -1,3 +1,10 @@
+# Release 0.4.21
+- Moved build settings into xcconfig (iPhone)
+- Flexible layouts; Works in iPad as universal app
+
+# Release 0.4.20
+- Fix armv6/armv7 device build setting
+
# Release 0.4.19
- Fix autorun env on iPhone
- Added re-run test (experimental!)
@@ -34,56 +34,56 @@
#import <GHUnit/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 {
- // To run all tests (from ENV)
- GHTestApp *app = [[GHTestApp alloc] init];
- // To run a different test suite:
- //GHTestSuite *suite = [GHTestSuite suiteWithTestFilter:@"GHSlowTest,GHAsyncTestCaseTest"];
- //GHTestApp *app = [[GHTestApp alloc] initWithSuite:suite];
- // Or set global:
- //GHUnitTest = @"GHSlowTest";
- [NSApp run];
- [app release];
- }
- [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 {
+ // To run all tests (from ENV)
+ GHTestApp *app = [[GHTestApp alloc] init];
+ // To run a different test suite:
+ //GHTestSuite *suite = [GHTestSuite suiteWithTestFilter:@"GHSlowTest,GHAsyncTestCaseTest"];
+ //GHTestApp *app = [[GHTestApp alloc] initWithSuite:suite];
+ // Or set global:
+ //GHUnitTest = @"GHSlowTest";
+ [NSApp run];
+ [app release];
+ }
+ [pool release];
+ return retVal;
}
@@ -31,10 +31,10 @@
// Some default statuses to use; Or define and use your own
enum {
- kGHUnitWaitStatusUnknown = 0,
- kGHUnitWaitStatusSuccess,
- kGHUnitWaitStatusFailure,
- kGHUnitWaitStatusCancelled
+ kGHUnitWaitStatusUnknown = 0,
+ kGHUnitWaitStatusSuccess,
+ kGHUnitWaitStatusFailure,
+ kGHUnitWaitStatusCancelled
};
/*!
@@ -45,12 +45,12 @@ enum {
@code
- (void)testSuccess {
- [self prepare];
-
- // Do asynchronous task here
- [self performSelector:@selector(_succeed) withObject:nil afterDelay:0.1];
-
- [self waitForStatus:kGHUnitWaitStatusSuccess timeout:1.0];
+ [self prepare];
+
+ // Do asynchronous task here
+ [self performSelector:@selector(_succeed) withObject:nil afterDelay:0.1];
+
+ [self waitForStatus:kGHUnitWaitStatusSuccess timeout:1.0];
}
- (void)_succeed {
@@ -62,14 +62,14 @@ enum {
*/
@interface GHAsyncTestCase : GHTestCase {
- NSInteger waitForStatus_;
- NSInteger notifiedStatus_;
-
- BOOL prepared_; // Whether prepared was called before waitForStatus:timeout:
- NSRecursiveLock *lock_; // Lock to synchronize on
- SEL waitSelector_; // The selector we are waiting on
-
- NSArray *_runLoopModes; // Run loop modes to run while waiting; Defaults to NSDefaultRunLoopMode, NSRunLoopCommonModes, NSConnectionReplyMode
+ NSInteger waitForStatus_;
+ NSInteger notifiedStatus_;
+
+ BOOL prepared_; // Whether prepared was called before waitForStatus:timeout:
+ NSRecursiveLock *lock_; // Lock to synchronize on
+ SEL waitSelector_; // The selector we are waiting on
+
+ NSArray *_runLoopModes; // Run loop modes to run while waiting; Defaults to NSDefaultRunLoopMode, NSRunLoopCommonModes, NSConnectionReplyMode
}
@property (retain, nonatomic) NSArray *runLoopModes;
@@ -93,11 +93,11 @@ enum {
For example,
@code
- - (void)testFoo {
- [self prepare];
- // Do asynchronous task here
- [self waitForStatus:kGHUnitWaitStatusSuccess timeout:1.0];
- }
+ - (void)testFoo {
+ [self prepare];
+ // Do asynchronous task here
+ [self waitForStatus:kGHUnitWaitStatusSuccess timeout:1.0];
+ }
@endcode
@param status kGHUnitWaitStatusSuccess, kGHUnitWaitStatusFailure or custom status
@@ -119,7 +119,7 @@ enum {
Notify waiting of status for test selector.
@param status Status, for example, kGHUnitWaitStatusSuccess
@param selector If not NULL, then will verify this selector is where we are waiting.
- This prevents stray asynchronous callbacks to fail a later test
+ This prevents stray asynchronous callbacks to fail a later test
*/
- (void)notify:(NSInteger)status forSelector:(SEL)selector;
Oops, something went wrong.

0 comments on commit 568d5d6

Please sign in to comment.