gh-unit

GHUnit error file _OBJC_CLASS_$_SenTestCase", referenced

烂漫一生 提交于 2019-12-31 02:17:26
问题 I'm using GHUnit in my project but when i try to run the app it gives errors Ld /Users/goldfire/Library/Developer/Xcode/DerivedData/WhatsMySpeed-amkgqintxyhelabqvrpouivmdglf/Build/Products/Debug-iphonesimulator/GHUnitTests.app/GHUnitTests normal i386 cd /Users/goldfire/Desktop/Example/WhatsMySpeed setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:

Is it even possible for one iOS app to access another app's Caches directory?

孤街浪徒 提交于 2019-12-25 15:55:40
问题 I'm writing a unit test with GHUnit. I would like to check if a file is being generated in the Caches directory within the Library directory of another app. Is this feasible, or are apps prevented from accessing each others' Library directories? And if so, are there any possible workarounds for creating a unit test for this? Could I possibly store the generated file in a different directory, such as Documents, or would that not help? 回答1: I don't understand the context that you're attempting

why gh-unit is better than SenTestCase ( in Xcode4 )?

China☆狼群 提交于 2019-12-07 12:22:57
问题 This post "Unit Testing in Xcode 4" talks about unit test, let me know the best solution "gh unit" , but I know that xcode4 just provides SenTestCase , so question here to know more reasons why you choose gh-unit ? And now xcode4 provide native unit testing framework, do you think that is the best choice now? 回答1: The best answer is "...well it depends." Here is a very good post on what the determining factors are (as well a a good comparison between the two): http://longweekendmobile.com

ARC, bridged cast and GHUnit

时光总嘲笑我的痴心妄想 提交于 2019-12-07 02:48:42
问题 I'm followinng tutorial from http://gabriel.github.com/gh-unit/docs/appledoc_include/guide_testing.html. The problem is that my project uses ARC and GHUnit doesn't. I managed previous errors, but now i should do bridged cast, that i've never used, and i'm lost. NSString *string1 = @"a string"; GHAssertNotNULL(string1, nil); //error here Error description: Implicit conversion of Objective-C pointer type 'NSString *' to C pointer type 'const void *' requires a bridged cast. Any help welcome :)

GHUnit Linker Error with App Classes

核能气质少年 提交于 2019-12-06 04:42:35
问题 I'm trying to run a GHUnit test to just test that a setter actually works for a NSManagedObject object in my app. My app is called Machine and my GHUnit target is called Tests. I've added Machine as a dependency to the Tests target. My object in the test is called Goal. Here is the code and the error in the Link is shown below. #import <GHUnitIOS/GHUnit.h> #import <CoreData/CoreData.h> #import "Goal.h" #import "GoalRec.h" @interface ControllerTests : GHTestCase { } @property (retain) Goal

Why does a false assertion in async test in GHUnit crash the app instead of just failing the test?

蓝咒 提交于 2019-12-05 15:44:27
问题 This question has very few views and no answers yet. If you have a suggestion what to change about this question to get more eyeballs, I'd be happy to hear them. Cheers! I'm using GHAsyncTestCase to test a custom NSOperation of mine. I'm setting the test case as a delegate on the operation object and I'm calling didFinishAsyncOperation on the main thread when it's done. When an assertion fails it throws an exception, which ought to be caught by the test case to render the test as "failed".

why gh-unit is better than SenTestCase ( in Xcode4 )?

馋奶兔 提交于 2019-12-05 12:54:03
This post "Unit Testing in Xcode 4" talks about unit test, let me know the best solution "gh unit" , but I know that xcode4 just provides SenTestCase , so question here to know more reasons why you choose gh-unit ? And now xcode4 provide native unit testing framework, do you think that is the best choice now? RMatthews The best answer is "...well it depends." Here is a very good post on what the determining factors are (as well a a good comparison between the two): http://longweekendmobile.com/2011/04/15/unit-testing-in-xcode-4-use-ocunit-and-sentest-instead-of-ghunit/ 来源: https:/

ARC, bridged cast and GHUnit

百般思念 提交于 2019-12-05 04:52:33
I'm followinng tutorial from http://gabriel.github.com/gh-unit/docs/appledoc_include/guide_testing.html . The problem is that my project uses ARC and GHUnit doesn't. I managed previous errors, but now i should do bridged cast, that i've never used, and i'm lost. NSString *string1 = @"a string"; GHAssertNotNULL(string1, nil); //error here Error description: Implicit conversion of Objective-C pointer type 'NSString *' to C pointer type 'const void *' requires a bridged cast. Any help welcome :) joseph.hainline Since you are comparing an NSString, you should use the GHAssertNotNil check. See NULL

GHUnit Linker Error with App Classes

孤人 提交于 2019-12-04 06:59:12
I'm trying to run a GHUnit test to just test that a setter actually works for a NSManagedObject object in my app. My app is called Machine and my GHUnit target is called Tests. I've added Machine as a dependency to the Tests target. My object in the test is called Goal. Here is the code and the error in the Link is shown below. #import <GHUnitIOS/GHUnit.h> #import <CoreData/CoreData.h> #import "Goal.h" #import "GoalRec.h" @interface ControllerTests : GHTestCase { } @property (retain) Goal *goal; @end @implementation ControllerTests @synthesize goal; - (BOOL)shouldRunOnMainThread { // By

GH-Unit for unit testing Objective-C code, why am I getting linking errors?

泪湿孤枕 提交于 2019-12-04 03:28:30
问题 I'm trying to dive into the quite frankly terrible world of unit testing using Xcode (such a convoluted process it seems.) Basically I have this test class, attempting to test my Show.h class #import <GHUnit/GHUnit.h> #import "Show.h" @interface ShowTest : GHTestCase { } @end @implementation ShowTest - (void)testShowCreate { Show *s = [[Show alloc] init]; GHAssertNotNil(s,@"Was nil."); } @end However when I try to build and run my tests it moans with this error: - Undefined symbols: "_OBJC