Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / October 2005



Tip: Looking for answers? Try searching our database.

How to set the active target ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brieuc Desoutter - 14 Oct 2005 18:50 GMT
Hi there,

As a good boy, I've tried to run unit tests on my code.
So I created an Objective-C test case class.
Then I created a Cocoa unit test bundle target, I added the test case
source files to the compile source build phase of the new target, added
the SenTestingKit framework to link with and build...

But now how do I tell XCode to build this specific target ?

Thanks for your help

brieuc
Michael Ash - 14 Oct 2005 20:04 GMT
Brieuc wrote:
> Hi there,
>
[quoted text clipped - 5 lines]
>
> But now how do I tell XCode to build this specific target ?

There are two popups in your project window's toolbar, one for setting the
target and one for setting the build style. If they aren't there,
customize your toolbar and add them. They can also be set under the
Project menu.

Signature

Michael Ash
Rogue Amoeba Software

Mark - 14 Oct 2005 20:10 GMT
In the upper left corner of the project window is a menu with the
targets in your project. Choose your unit testing target from the menu
to make the unit testing target the active target. Now when you build
your project, Xcode will build the unit testing target.

For unit testing to work, you also have to make your program's target a
direct dependency of the unit testing target. By creating the direct
dependency, Xcode builds your program when it builds the unit testing
target. To create the direct dependency:

1. Select the unit testing target from the Groups and Files list.
2. Click the Info button to open the target's information panel.
3. Click the General tab.
4. Click the + button to add a direct dependency.
5. Choose a target from the sheet that opens and click the Add Target
button.

Mark Szymczyk
Author, Xcode Tools Sensei
http://www.meandmark.com
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.