Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2003-01-01 04:25:47


> There's one thing I'm wondering about. If you get an exception in a test,
it
> won't show which line caused the exception, only that one has happened
> somewhere. In a unit test with 100+ tests, it can be hard to find which
one
> caused the exception, so I started to litter the test code with
> BOOST_CHECKPOINT(), which then shows up at the exception. However, I
> realised that even this was just narrowing down the search, and to
pinpoint
> the error line, one would need one BOOST_CHECKPOINT() for each test line.
So
> why not automate this?

While working on first revision to Boost.Test I thought about very same
issue in regards to fatal/system errors during testing: How to help
programmer to locate where in test case problem occurred? I was about to
implement automatic "checkpointing" when I realized that in fact it is
already in place in existent implementation: Just set log level to "all"
and last pass/fail message will give you all information you need.

So I do not believe any extension is required in this matter.

Regards,

Gennadiy

P.S. I've tried several times to reply to your private mail. But got
"Undeliverable mail..." message. Here is the question and reply:

--- Terje Slettebø <tslettebo_at_[hidden]> wrote:
>P.S. I haven't been able to set the reporting level, by setting environment
>variables in Windows. Is there some other way to set the reporting level
> for the unit test framework?

--report_level=[confirm,short,detailed,no]
environment variable: BOOST_TEST_REPORT_LEVEL

Be aware that after setting environment variable in windows you may need
to restart GUI, so it will pick up new value.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk