From: solar Date: Mon, 30 Jan 2006 20:46:59 +0000 (+0000) Subject: Added test driver. X-Git-Tag: v0.4~11 X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=ad4ffe2e8341d440dd75980817ad13324699d648 Added test driver. --- diff --git a/functions/stdlib/_Exit.c b/functions/stdlib/_Exit.c index 14fdb5b..e46af39 100644 --- a/functions/stdlib/_Exit.c +++ b/functions/stdlib/_Exit.c @@ -15,6 +15,7 @@ void _Exit( int status ) { + /* TODO: Flush and close open streams. Remove tmpfile() files. */ _PDCLIB_Exit( status ); } @@ -26,7 +27,7 @@ void _Exit( int status ) int main() { BEGIN_TESTS; - TESTCASE( NO_TESTDRIVER ); + /* TODO: Add testdrivers after flush / close / tmpfile is implemented. */ return TEST_RESULTS; } diff --git a/functions/stdlib/exit.c b/functions/stdlib/exit.c index 5cb2a50..969b795 100644 --- a/functions/stdlib/exit.c +++ b/functions/stdlib/exit.c @@ -12,6 +12,10 @@ #ifndef REGTEST +/* TODO - "except that a function is called after any previously registered + functions that had already been called at the time it was registered. +*/ + struct _PDCLIB_exitfunc_t * regstack = NULL; void exit( int status ) @@ -24,7 +28,6 @@ void exit( int status ) free( next ); next = regstack; } - /* TODO: Flush and close open streams. Remove tmpfile() files. */ _Exit( status ); } @@ -36,7 +39,7 @@ void exit( int status ) int main() { BEGIN_TESTS; - TESTCASE( NO_TESTDRIVER ); + /* Unwinding of regstack tested in atexit(). */ return TEST_RESULTS; }