Re: Re: Unit testing and Xcode integration
Re: Re: Unit testing and Xcode integration
- Subject: Re: Re: Unit testing and Xcode integration
- From: "Keith Ray" <email@hidden>
- Date: Tue, 15 Aug 2006 18:03:57 -0700
When you run this, you get 2 failures instead of one, and the code
that should not run does run.
I actually prefer that behaviour. If my code has 100 failing tests in
it I want to know about all of them, not just the first one. But I
suppose OCUnit could be modified to optionally throw an exception on
failing a test, and to abort when such an exception occurs.
If you're using Objective-C++, you don't want objective-c exceptions
being thrown because that will skip C++ destructors of objects in your
test, with possible fatal consequences.
And vice-versa, if I recall correctly, throwing c++ exceptions across
objective-c functions results in crashes also.
So a test framework that doesn't throw exceptions seems to be the best
compromise for Objective-C++ users. (like me).
I would want output for passed tests only if there is a problem not
being detected by the test-suite, such as program termination... so
such output would have to be switchable.
In my own version of Michael Feather's CppUnit, which I no longer use
or have access to, I had control over running an invidual test-suite
or running all test-suites, and outputting the duration for each test
in (milli-)seconds.
I have contemplated altering UnitKit to figure out which tests were
newer than the others, and running those first. (It would keep a
record of tests it had run before.) Also, running the faster tests
before the slower tests (it would have to record test durations).
Consistent test order is not as important to me as speed in running
the tests I am currently working on -- automatically or manually
selected.
--
C. Keith Ray
<http://homepage.mac.com/keithray/blog/index.html>
<http://homepage.mac.com/keithray/xpminifaq.html>
<http://homepage.mac.com/keithray/resume2.html>
_______________________________________________
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