NOAA-EMC / NCEPLIBS-bufr

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

complete testing of stseq.c #368

Closed edwardhartnett closed 8 months ago

edwardhartnett commented 1 year ago

This code is not tested.

            if ( naf > 0 ) {
/*
**              There are associated fields in effect which will modify this
**              descriptor when storing it within the internal Table D.  So
**              create a new sequence to store the contents of this descriptor
**              along with its associated fields.
*/
                rpidn = igettdi( lun );

                sprintf( rpseq, "REPLICATION SEQUENCE %.3lu",
                         ( unsigned long ) ++(*irepct) );
                memset( &rpseq[24], (int) cblk, 31 );
                sprintf( nemo2, "RPSEQ%.3lu", ( unsigned long ) *irepct );

                stseq( lun, irepct, &rpidn, nemo2, rpseq,
                    &idefxy_c[icvidx(&ipt,&i0,&imxcd)],
                    &ndelem_c[ipt] );
                pkint = rpidn;

            }

Since this is C code there should be a C test for this...

edwardhartnett commented 8 months ago

This subroutine is now 84% tested, and the previously untested code listed above has now been tested.

There are still some bort conditions that could probably be tested, but I will close this issue because it was about the big block of untested code, not the bort conditions.