ADVERTISEMENT
|
|
Unit testing and analysis coverage
by Aaron Montgomery Mar, 2008 Issue
Article Synopsis
If you are building projects with Xcode, you are already using targets in your project. The target collects together information about how to build a library or application. If you are working with more complicated projects, you may have one target that builds a library and a second target that builds an application that depends on that library. This article describes Xcode targets that help in auxiliary tasks. Using an Xcode target to produce documentation has been discussed in MacTech (see the references at the end of the article). In this article, we present a target that runs unit tests using the CPlusTest framework for Carbon applications (there is also a Sen Testing Kit for Cocoa applications, but we will not cover that here). We will then add a shell script that allows us to use the Linux Coverage Tool to analyze how much of our code we are executing.
This article was published in the 24.03 issue of MacTech Magazine. Subscribers saw
this article in the print magazine when it was first published. MacTech provides its readers with valuable information
each and every month, but even if it only solves one problem for you a year, it's more than paid for itself.
Subscribe today with a special RISK FREE trial subscription ... and get the back issues at the MacTech Store, or the new MacTech CD with the history of
the magazine all in one convenient place.
|