Does anyone do any form of code coverage testing on their UniBasic code?

 

The profiler only does time and subroutines called, unless I'm missing
something.

 

I'm thinking of writing a parser for the profiler log which strips out
what subroutines were called and how many times. Comparing those numbers
to how many places the subroutine is called in the code will at least
tell us if we are certain some sections could not have been called...

 

 

For example, given:

 

33.3 0.02 0.02 1 BP/_MAIN_PROG:SUBRA

33.3 0.04 0.02 1 BP/_MAIN_PROG:SUBRB

16.7 0.05 0.01 1 BP/_MAIN_PROG

 

 

>From code such as:

 

...

IF X THEN

   CALL SUBRA(X)

END ELSE

   CALL SUBRA(Y)

END

 

CALL SUBRB(Z)

...

 

Which would give us a rough code coverage percentage for this run of 75%

 

 

Any better ideas that don't involve changes or preprocessing of the
code?

 

Regards,

Dan 


###########################################################################################
The information transmitted in this message and attachments (if any) is 
intended only
for the person or entity to which it is addressed. The message may contain 
confidential
and/or privileged material.  Any review, retransmission, dissemination or other 
use of
or taking of any action in reliance upon this information by persons or 
entities other
than the intended recipient is prohibited.  If you received this in error, 
please
contact the sender and delete the material from any computer.

The intended recipient of this e-mail may only use, reproduce, disclose or 
distribute
the information contained in this e-mail and any attached files with the 
permission of IMB.
###########################################################################################
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to