Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SenTestingKit fails when using CG-Only



On Nov 9, 2007, at 9:07 AM, email@hidden wrote:

I recently tried to get my test rig up and running in leopard, and my framework has been using GC only for a while now.
Setting up a custom executable to call otest on my test bundle, causese the following error:

Is this known, and if so, is there a workaround? If I have an app, and want to test a critical section, that uses only GC.... how can I accomplish that if SenTestingKit is gonna barf every time I throw GC- Only objects at it?

The SenTestingKit.framework included with Xcode 3.0 is built GC- supported, so it's not at fault. However, the otest test rig that runs unit test bundles for frameworks is *not* built GC-supported in Xcode 3.0.


To run tests for your framework, you'll need to build your own test rig, and then tell Xcode to use it in otest's place.

You should be able to build your own test rig by just creating a simple command-line tool that links Cocoa.framework and SenTestingKit.framework, sets the SenTestTool user default in the registration domain to YES (which indicates to the framework that a test tool is being used), and then calls through to SenSelfTestMain. The SenTestTool user default and SenSelfTestMain function are declared in <SenTestingKit/SenTestProbe.h>.

To tell Xcode to use your test rig instead of otest, just set the OTEST build setting to the path to your test rig.

  -- Chris

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >SenTestingKit fails when using CG-Only (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.