Boost Users :
Subject: Re: [Boost-users] [Boost.Test] BOOST_FAIL vs BOOST_ERROR
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2009-06-06 03:01:33
Greg Christopher wrote:
>> Why was it incorrect? Your test case indeed did not run any assertions.
>> warning you can ignore safely in your case.
> Well, the message says "include any assertions" not "did not run any assertions".
Good point. I guess I can change the warning message.
> However the bigger issue is: How do I grep the log to see if there was an aborted test run due to setup?
You can't have it both ways. Either you want your test case to be
reported as aborted or as as passed.
> I guess I can look for this string "doesn't include any assertions".
> That seems like I'm doing it by side effect less than a more direct message that explains that the test case chose to quit because setup failed.
You can 2 options:
1. You can fail some REQUIRE level check and thus abort the test case.
2. You can detect that the test case did not run any assertions as a
condition that it was aborted by fixture setup
In both case I do not recommend to parse plain text output, but to
switch to XML report and it's process it.
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