You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Martin Sebor <se...@roguewave.com> on 2006/12/06 18:58:57 UTC
missing assertion counts in exec output
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% |
# +-----------------------+--------+--------+--------+
Re: missing assertion counts in exec output
Posted by Martin Sebor <se...@roguewave.com>.
Andrew Black wrote:
> 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.
Okay. Please make sure to keep the Change Log line
length below 80 characters.
Also, as an FYI, unsigned int is the same thing as
unsigned, so using the verbose form is unnecessary
and redundant. I suggest you switch to the shorter
form for brevity and consistency with int (we use
plain int and long as opposed to "signed int" and
"signed long int").
Thanks
Martin
Re: missing assertion counts in exec output
Posted by Andrew Black <ab...@roguewave.com>.
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% |
> # +-----------------------+--------+--------+--------+