Unit Test question: BOOST_CHECK_MESSAGE and high logging levels
Folks, I just noticed something: a unit test with something like this BOOST_CHECK_MESSAGE ( true, "this should never be seen" ); will, of course, be silent when run... unless you've got the logging turned all the way up. When run with --log_level=all --report_level=detailed this turns up in the output: ./../util/unitTest/test_auto.C(32): info: this should never be seen Is this intentional? It is suprising to me... if the message in the check says something about "failing" or "errors", the output appears to be signaling a unit test failure when really it isn't. Am I missing something? Thanks!! ---------------------------------------------------------------------- Dave Steffen, Ph.D. "Irrationality is the square root of all evil" Software Engineer IV -- Douglas Hofstadter Numerica Corporation ph (970) 419-8343 x27 "Oppernockity tunes but once." -- anon. fax (970) 223-6797 dgsteffen@numerica.us ___________________ Numerica Disclaimer: This message and any attachments are intended only for the individual or entity to which the message is addressed. It is proprietary and may contain privileged information. If you are neither the intended recipient nor the agent responsible for delivering the message to the intended recipient, you are hereby notified that any review, retransmission, dissemination, or taking of any action in reliance upon, the information in this communication is strictly prohibited, and may be unlawful. If you feel you have received this communication in error, please notify us immediately by returning this Email to the sender and deleting it from your computer.
Folks,
I just noticed something: a unit test with something like this
BOOST_CHECK_MESSAGE ( true, "this should never be seen" );
will, of course, be silent when run... unless you've got the logging turned all the way up. When run with
--log_level=all --report_level=detailed
this turns up in the output:
./../util/unitTest/test_auto.C(32): info: this should never be seen
Is this intentional? It is suprising to me... if the message in the check says something about "failing" or "errors", the output appears to be signaling a unit test failure when really it isn't.
With latest CVS HEAD software the message would look like:
./../util/unitTest/test_auto.C(32): info: check 'this should never be seen' passed
And yes - it is intentional. log_level=all mean that all assertions including those that passed are logged. Gennadiy
Gennadiy Rozental writes: [...]
And yes - it is intentional. log_level=all mean that all assertions including those that passed are logged.
OK. Thanks. I'll turn the logging level down a little. The library is turning out to be very useful, BTW. Thanks very much. ---------------------------------------------------------------------- Dave Steffen, Ph.D. "Irrationality is the square root of all evil" Software Engineer IV -- Douglas Hofstadter Numerica Corporation ph (970) 419-8343 x27 "Oppernockity tunes but once." -- anon. fax (970) 223-6797 dgsteffen@numerica.us ___________________ Numerica Disclaimer: This message and any attachments are intended only for the individual or entity to which the message is addressed. It is proprietary and may contain privileged information. If you are neither the intended recipient nor the agent responsible for delivering the message to the intended recipient, you are hereby notified that any review, retransmission, dissemination, or taking of any action in reliance upon, the information in this communication is strictly prohibited, and may be unlawful. If you feel you have received this communication in error, please notify us immediately by returning this Email to the sender and deleting it from your computer.
participants (2)
-
Dave Steffen
-
Gennadiy Rozental