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




The code below surfaced in this group on 10 november by Chris Hanson. It was augmented a day later by Andre and claims to have solved the problem of unit testing with the GCRequired setting.


When I tried to implement this scheme it did not work for me. I suspect I am not doing things as should be with the following:
- in the project for a framework made a target with the unit testing code;
- made this target dependent on the framework target;
- the above setup is working except for GCRequired;
- Took the amended code (as per 11-11) into a .h/.m pair generated from the new file wizard opting for Objective C Test Class;
- added the files to the target.
This setup appears to be at fault, because the NSLog message does not appear and otest crashes. Besides, a get a compilation warning "SenTestProbe may not respond to runTests".
Clearly I am at the wrong track and would very much appreciate it if someone will provide me with more specific and detailed instructions on this issue.
Hans van der Meer



The code for reference (abbreviated):
#import "GCRequiredUnitTesting.h"
@implementation GCRequiredUnitTesting
int main (int argc, const char * argv[]) {
...
// Tell SenTestingKit to use our last argument as the test bundle, to
// run all the tests it can find, and that the executable is equivalent
// to the otest test rig supplied with OCUnit.
...

	NSLog(@"Your (Garbage Collected) Test Suite is %@ \n",lastArgument);

...
	//Probing
	[SenTestProbe runTests:testDefaults];
...


Hans van der Meer




_______________________________________________

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


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.