*/
#include <stdio.h>
-#include <_PDCLIB_glue.h>
#ifndef REGTEST
+#include <_PDCLIB_glue.h>
+
#include <stdbool.h>
#include <string.h>
int main( void )
{
FILE * fh;
- remove( testfile );
- TESTCASE( ( fh = fopen( testfile, "w" ) ) != NULL );
+ TESTCASE( ( fh = tmpfile() ) != NULL );
TESTCASE( fwrite( "SUCCESS testing fwrite()\n", 1, 25, fh ) == 25 );
- TESTCASE( fclose( fh ) == 0 );
/* TODO: Add readback test. */
- TESTCASE( remove( testfile ) == 0 );
+ TESTCASE( fclose( fh ) == 0 );
return TEST_RESULTS;
}