stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Black <abl...@roguewave.com>
Subject Re: missing assertion counts in exec output
Date Wed, 06 Dec 2006 22:07:19 GMT
Greetings Martin.

What is happening is that display.cpp blanks out the ASSERTS, FAILED, 
and PERCNT columns if the total number of assertions is 0.  A likely 
cause for this condition is if no asserts occur.  This is done for a 
couple reasons.  First, it hides these columns for the examples. 
Second, it prevents divide by 0 errors.  Attached is a patch that alters 
this behavior.

--Andrew Black

Changelog:
	* output.cpp (check_test): Set status->failed to -1, and status->assert 
to -2 on overflow of respective variables, set status->status to 
ST_OVERFLOW on overflow of status->t_warn.
	(check_example): Set status->assert to -1 to denote example.
	* display.cpp (print_status_plain): Alter parsing of status->assert to 
treat -1 as example (rather than 0), and special case 0 to avoid divide 
by 0 errors.


Martin Sebor wrote:
> When run through exec the test 20.operators is missing
> assertion totals even though it runs successfully to
> completion. I suspect it might be because the test
> output doesn't show any assertion totals either (see
> below). If that's so (i.e., if that's by design), I
> think we should change the behavior of exec to report
> zeros for both totals instead.
> 
> Thoughts?
> 
> Martin
> 
> $ ./20.operators
> # INFO (S1) (9 lines):
> # TEXT:
> # COMPILER: HP aCC, __HP_aCC = 60500
> # ENVIRONMENT: ia64 running hp-ux
> # FILE: 20.operators.cpp
> # COMPILED: Dec  6 2006, 09:18:33
> # COMMENT: interactions with the rest of the implementation
> ######################################################
> # CLAUSE: lib.operators
> 
> # +-----------------------+--------+--------+--------+
> # | DIAGNOSTIC            | ACTIVE |  TOTAL |INACTIVE|
> # +-----------------------+--------+--------+--------+
> # | (S1) INFO             |      1 |      1 |     0% |
> # +-----------------------+--------+--------+--------+

Mime
View raw message