From: solar Date: Sun, 4 Apr 2010 12:15:51 +0000 (+0000) Subject: Improper test code handling uncovered by Owen at osdev.org X-Git-Tag: v0.5~105 X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=9e1a90fce7fa732ebca11e98a41dc8418746b942 Improper test code handling uncovered by Owen at osdev.org --- diff --git a/functions/_PDCLIB/Readme.txt b/functions/_PDCLIB/Readme.txt new file mode 100755 index 0000000..797af9d --- /dev/null +++ b/functions/_PDCLIB/Readme.txt @@ -0,0 +1,13 @@ +$Id$ + +This directory holds various "internals" of PDCLib: + +- definitions of helper functions not specified by the standard (hidden in the + _PDCLIB_* namespace); + +- definitions of data objects, both internal (like digits.c) and specified by + the standard (errno.c); + +- test drivers for functionality that does not have its own implementation + file to put the test driver in. + diff --git a/functions/_PDCLIB/prepread.c b/functions/_PDCLIB/prepread.c index 53a2976..ef2f70e 100644 --- a/functions/_PDCLIB/prepread.c +++ b/functions/_PDCLIB/prepread.c @@ -32,3 +32,14 @@ int _PDCLIB_prepread( struct _PDCLIB_file_t * stream ) } } +#ifdef TEST +#include <_PDCLIB_test.h> + +int main( void ) +{ + /* Testing covered by ftell.c */ + return TEST_RESULTS; +} + +#endif + diff --git a/functions/_PDCLIB/prepwrite.c b/functions/_PDCLIB/prepwrite.c index 774aeb2..c5a4c12 100644 --- a/functions/_PDCLIB/prepwrite.c +++ b/functions/_PDCLIB/prepwrite.c @@ -22,3 +22,14 @@ int _PDCLIB_prepwrite( struct _PDCLIB_file_t * stream ) return 0; } +#ifdef TEST +#include <_PDCLIB_test.h> + +int main( void ) +{ + /* Testing covered by ftell.c */ + return TEST_RESULTS; +} + +#endif +