• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Asynchronous Unit testing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • XCode Expressions during debugging
      • From: "John Huss" <email@hidden>
References: 
 >Re: Asynchronous Unit testing (From: Mike Zornek <email@hidden>)
 >Re: Asynchronous Unit testing (From: Ruotger Skupin <email@hidden>)

  • Prev by Date: Re: RTTI and exceptions between plugins (solution)
  • Next by Date: XCode Expressions during debugging
  • Previous by thread: Re: Asynchronous Unit testing
  • Next by thread: XCode Expressions during debugging
  • Index(es):
    • Date
    • Thread