From 9e1a90fce7fa732ebca11e98a41dc8418746b942 Mon Sep 17 00:00:00 2001 From: solar Date: Sun, 4 Apr 2010 12:15:51 +0000 Subject: [PATCH] Improper test code handling uncovered by Owen at osdev.org --- functions/_PDCLIB/Readme.txt | 13 +++++++++++++ functions/_PDCLIB/prepread.c | 11 +++++++++++ functions/_PDCLIB/prepwrite.c | 11 +++++++++++ 3 files changed, 35 insertions(+) create mode 100755 functions/_PDCLIB/Readme.txt 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 + -- 2.40.0