Boost logo

Boost Users :

Subject: Re: [Boost-users] First attempt at using Boost::Test is a flop: the program ends with an exception related to std::string but I don't use any
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-05-21 21:10:49


AMDG

On 05/21/2012 04:48 PM, Ted Byers wrote:
> Thank you one and all who replied. Your replies were quite helpful.
>
> I have a couple final questions.
>
> 1) What does such a test program return to whatever invoked it. But that I
> mean, can I build the testsuite using make, have make execute the testsuite
> program, and fail with an error if one of the tests fail? If so, I can
> create another target in my makefiles that do just that, and still another
> one that checks code into an SVN repository after doing an update against
> the repository and rebuilding everything, and verifying the testsuite builds
> and runs successfully (and bales before the check-in if one of the tests
> fails).

If any test fails or crashes, the test program
returns non-zero. What you want sounds like exactly
what we do in our own regression tests.

> 2) Is there a tool included in Boost::Test that provides support for code
> coverage, that can be used to check to verify that all the code in the
> source code is tested by one or more test cases in the test suite? I have
> found several open source tools (gcov, trucov, and covtool), but have not
> yet had a chance to investigate them. Again, I want an automated way to
> ensure that all code in my project is subjected to one, or, preferably more,
> tests.
>

This isn't really something that can be
handled from within C++. You need an
external tool, or compiler support.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net