Re: Asynchronous Unit testing
Re: Asynchronous Unit testing
- Subject: Re: Asynchronous Unit testing
- From: Chris Hanson <email@hidden>
- Date: Wed, 8 Feb 2006 11:20:46 -0800
On Feb 8, 2006, at 10:04 AM, Ruotger Skupin wrote:
Unfortunately it's not as easy as that. My code requires that I
return and have the run loop call me back (thus the
NSPostWhenIdle). That seems to involve setting up a thread, a run
loop, a lock etc, etc...
OCUnit doesn't run unit tests within a runloop itself. You should be
able to run one yourself from within your tests as Mike showed. You
shouldn't have to set up threads and locks and such to do that.
Maybe it's easier to write my own testing kit?
I wouldn't go that far.
It might be worth trying to decoupling your functional code more from
the mechanism that invokes it. This will allow you to invoke your
functional code directly from within your tests, and send your
objects the same messages in the same sequence as they would receive
from the timers and queues. (Or as they would receive from the
bridge methods or objects that you use to connect the timers and
queues to your code.)
-- Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden