• 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: Unit testing framework suggestions?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unit testing framework suggestions?


  • Subject: Re: Unit testing framework suggestions?
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Fri, 24 Sep 2004 17:57:27 +0200

At 14:51 Uhr +0200 24.09.2004, Marco Scheurer wrote:
The answer is certainly not like this, AFAIK none of the kits automatically generate code. To do this kind of tests with OCUnit you would use one of a bunch of macros to test that exceptions are thrown or not, for instance:

- (void) testSetRatioRange
{
STAssertNoThrow ([x setRatio: minimum], nil);
STAssertNoThrow ([x setRatio: maximum], nil);
STAssertThrowsSpecificNamed ([x setRatio:minimum - epsilon], NSException, NSInvalidArgumentException, nil);
STAssertThrowsSpecificNamed ([x setRatio:maximum + epsilon], NSException, NSInvalidArgumentException, nil);
}


I'm not sure that automatically generating such code is worth the effort.

Well, I guess one could just have a macro that does a typical sequence of such tests, right? After all, testing a minimum and maximum and that it doesn't or does throw on these should be a pretty common request.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Unit testing framework suggestions?
      • From: Georg Tuparev <email@hidden>
References: 
 >Re: Unit testing framework suggestions? (From: Tim Hart <email@hidden>)
 >Re: Unit testing framework suggestions? (From: "M. Uli Kusterer" <email@hidden>)
 >Re: Unit testing framework suggestions? (From: Marco Scheurer <email@hidden>)
 >Re: Unit testing framework suggestions? (From: "M. Uli Kusterer" <email@hidden>)
 >Re: Unit testing framework suggestions? (From: Marco Scheurer <email@hidden>)

  • Prev by Date: Re: Is _objc_flush_caches_(Class) necessary to swizzle methods?
  • Next by Date: Re: Panther or Jaguar as requirement (was: reloadData, but less expensive)
  • Previous by thread: Re: Unit testing framework suggestions?
  • Next by thread: Re: Unit testing framework suggestions?
  • Index(es):
    • Date
    • Thread