From 8e5f9c82ccdd4afccaaad2c2e711c7fec3856d40 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 7 Sep 2010 10:44:35 +1000 Subject: [PATCH 1/2] Add a note about building GHUnitIOS.framework. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 156ae5c1..3885d984 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,7 @@ You should see something like: ## Adding a GHUnit Test Target (iOS) +- If you are building from source, run `make` from within the `Project-IPhone` directory to create `GHUnitIOS.framework`. - Add a `New Target`. Select `Cocoa Touch -> Application`. Name it `Tests` (or something similar). - Add the `GHUnitIOS.framework` to your project. - Add the following frameworks to `Linked Libraries`: From c925f27c17982a2437fef0522d7352b0e94d4644 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 7 Sep 2010 10:52:33 +1000 Subject: [PATCH 2/2] Update example test cases so that they compile. --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3885d984..ddf6aad4 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,7 @@ For example `MyTest.m`: - (BOOL)shouldRunOnMainThread { // By default NO, but if you have a UI test or test dependent on running on the main thread return YES + return NO; } - (void)setUpClass { @@ -113,13 +114,15 @@ For example `MyTest.m`: } - (void)testFoo { - GHTestLog(@"I can log to the GHUnit test console: %@", foo); + NSString *a = @"foo"; + GHTestLog(@"I can log to the GHUnit test console: %@", a); // Assert a is not NULL, with no custom error description GHAssertNotNULL(a, nil); // Assert equal objects, add custom error description - GHAssertEqualObjects(a, b, @"Foo should be equal to: %@. Something bad happened", bar); + NSString *b = @"bar"; + GHAssertEqualObjects(a, b, @"a should be equal to: %@. Something bad happened", b); } - (void)testBar { @@ -170,6 +173,7 @@ For example `MyTest.m`: - (BOOL)shouldRunOnMainThread { // By default NO, but if you have a UI test or test dependent on running on the main thread return YES + return NO; } - (void)setUpClass { @@ -190,10 +194,12 @@ For example `MyTest.m`: - (void)testFoo { // Assert a is not NULL, with no custom error description + NSString *a = @"foo"; GHAssertNotNULL(a, nil); // Assert equal objects, add custom error description - GHAssertEqualObjects(a, b, @"Foo should be equal to: %@. Something bad happened", bar); + NSString *b = @"bar"; + GHAssertEqualObjects(a, b, @"a should be equal to: %@. Something bad happened", b); } - (void)testBar {