Re: C++ unit testing in Xcode
Re: C++ unit testing in Xcode
- Subject: Re: C++ unit testing in Xcode
- From: Marco Scheurer <email@hidden>
- Date: Mon, 7 Mar 2005 15:38:10 +0100
On Mar 07, 2005, at 04:15AM, Sean Houghton wrote:
I've been using the boost test framework to do all my unit testing.
My project contains a static library target and an application target
that contains all the tests and depends on the library. The test
application has a custom build stage which simply runs the test after
being built.
When a test fails Xcode detects the failure in the custom build stage
but doesn't tell me about it. I have to look in the detailed build
results, find the failure, manually open the file and go to the line
that failed.
VS.NET is kind enough to parse the output of any custom build tool for
warnings and errors so you can double click them and get right to the
problem. It even put them into the task list for you.
I've seen a few OC testing tools for Xcode that appear to add test
failures to the "Errors and Warnings" list in Xcode. Can I populate
this list from a shell script or AppleScript? Is anyone else using
C++ and unit tests with Xcode?
Having the output of shell scripts appear as errors in Xcode is not
difficult. All you need to do is prefix your messages with the
filename, the line number, and "error" or "warning" like so:
filename.c:number: error: "Your message"
Following OCUnit (http://www.sente.ch/software/ocunit/ ) what all the
Objective C testing kits do is to look for test cases at runtime, which
is a further improvement in the XCode / unit testing integration, and
that would be hard to do for C++. Note that OCUnit is Objective-C++
friendly.
Marco Scheurer
Sen:te, Lausanne, Switzerland http://www.sente.ch
_______________________________________________
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