Re: OCUnit vs OBJCUnit
Re: OCUnit vs OBJCUnit
- Subject: Re: OCUnit vs OBJCUnit
- From: James Quick <email@hidden>
- Date: Wed, 25 Jun 2003 20:23:55 -0400
On Wednesday, June 25, 2003, at 04:38 PM, Michael Tsai wrote:
On Wednesday, June 25, 2003, at 12:50 PM, James Quick wrote:
Before I invest more time in learning about them, I would like to know
if anyone on this list is actively using either of the tools as part
of their
regular workfow?
Both seem to be good tools. I chose ObjcUnit because its approach of
using a separate target seemed to make it easier to keep test code
separate and to only run the tests when I want to. OCUnit's
integration with the Project Builder error list is slick, but I found
that I preferred the JUnit-style text output. Also, OCUnit's macros
conflicted with Objective-C++ (not sure whether that's still the
case), which I was using at the time.
ObjcUnit also has some pre-build mock classes, which you may find
useful. My main complaint about it is that the JUnit-style methods for
assertion are very verbose. I wrapped them in macros that stuff
__FILE__ and __LINE__ into the message string so that I can easily
figure out which assertion failed.
OCUnit currently defines whether to run or not run tests based on PB
Build styles.
In the Build settings pane for a style with tests enabled the variable
TEST_AFTER_BUILD = YES
is set.
It seems just as easy to change the build setting as change the active
targets.
I don't know about C++ macros collisions. Thanks for the heads up on
that.
I don't use C++ (I agree with whoever said, C++ is to C as lung cancer
is to lung),
but if I did that would be important to know.
I see the MockCoder implementation, which I presume just layers a FIFO
dummy encode/decode layer on top of NSCoder. I also see a MockObjects.h
which includes this mock coding protocol. I've read a bit about using
Mock
Objects in design/testing in the past couple of days, but don't really
understand
how this is used. Could you please elaborate?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.