* Sen:Te's guide
Configure the project
1. Add a ‘Unit Tests’ target
From the Project > New Target… menu add a Mac OS X > Cocoa > Unit Test
2. Configure ‘Unit Tests’ through its inspector:
In the ‘Build’ tab delete all ‘User-Defined Settings’ and the ‘Other Linker Flags’ setting.
In the ‘General’ tab add the Foundation and SenTestingKit frameworks
(/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.sdk/Developer/Library/Frameworks/SenTestingKit.framework)
3. Make the application a dependency of ‘Unit Tests’:
In the ‘General’ tab of the application add ‘UnitTests’ as a direct dependency.
Write some tests
4. Avoid compiling tests outside of the simulator:
#include "TargetConditionals.h"
#if !TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
// the SenTestCase implementation goes here...
#endif
* StackOverflow discuss:
I also changed Base SDK to be Device - iPhone OS 2.2 and other linker flags to -framework Foundation -framework SentestingKit
No comments:
Post a Comment