On 6/5/2014 12:28 PM, Aaron Price wrote:

I have just tried the code coverage tool to check the coverage one of
our RPGUNIT test programs.

It seemed to work correctly for all subprocedures, however the coverage
tool shows zero% coverage for all of the main procedure code (this
cannot be the case as the Main Procedure is what is calling the
subprocedures). The report shows the Main procedure code (including
*INZSR) all highlighted in Red and there is a 0% coverage item in the
Program tree.

I see the same thing. This appears to be an issue for programs with a
main procedure. Programs that use *ENTRY PLIST show coverage properly
in the 'mainline' section. For example, this shows 100% coverage:

d binary s 9b 0
d int s 10i 0
d uint s 10u 0

* all these occupy 4 bytes of storage
c eval binary = *hival
c eval int = *hival
c eval uint = *hival

c binary dsply
c int dsply
c uint dsply

This shows 0% coverage:

// *entry plist
dcmpfr1 pr extpgm('CMPFR1')
d inPrdFil 10
d inPrdLib 10

dcmpfr1 pi
d inPrdFil 10
d inPrdLib 10

// load work fields from input
prdFil = %trim(inPrdFil);
prdLib = %trim(inPrdLib);


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.