NOAA-EMC / NCEPLIBS-bufr

The NCEPLIBS-bufr library contains routines and utilites for working with the WMO BUFR format.
Other
40 stars 19 forks source link

more tests #558

Closed jbathegit closed 5 months ago

jbathegit commented 5 months ago

Part of #445

jbathegit commented 5 months ago

FYI, the BORT 906 statement in readlc() is unreachable, because MSGUNP(LUN) can never have any value other than 0, 1, or 2. So after taking out that ELSE branch, I also simplified the existing ELSEIF(MSGUNP(LUN).EQ.2) THEN statement to just be an ELSE statement.

jbathegit commented 5 months ago

FYI, rewnbf() in it's previous form would core dump if a user mistakenly called the routine with ISR=1 without having previously called it with ISR=0. In that case, the value of JUNN would be undefined, so the evaluation of JSR(JUNN) would result in a core dump. I fixed this by explicitly initializing JUNN=0 and then adding a second BORT 902 test to check for that value.

jbathegit commented 5 months ago

This PR now gets us up to 93.3% line coverage and 71.6% branch coverage.