diff options
Diffstat (limited to 'stdio-common')
-rw-r--r-- | stdio-common/test-fseek.c | 7 | ||||
-rw-r--r-- | stdio-common/test-popen.c | 7 | ||||
-rw-r--r-- | stdio-common/test-vfprintf.c | 7 | ||||
-rw-r--r-- | stdio-common/tst-cookie.c | 7 | ||||
-rw-r--r-- | stdio-common/tst-fileno.c | 7 | ||||
-rw-r--r-- | stdio-common/tst-gets.c | 7 | ||||
-rw-r--r-- | stdio-common/tst-obprintf.c | 7 | ||||
-rw-r--r-- | stdio-common/tst-perror.c | 7 | ||||
-rw-r--r-- | stdio-common/tst-sprintf.c | 7 | ||||
-rw-r--r-- | stdio-common/tst-sprintf2.c | 7 | ||||
-rw-r--r-- | stdio-common/tst-sprintf3.c | 7 | ||||
-rw-r--r-- | stdio-common/tst-swprintf.c | 7 | ||||
-rw-r--r-- | stdio-common/tst-tmpnam.c | 7 | ||||
-rw-r--r-- | stdio-common/tst-unbputc.c | 7 | ||||
-rw-r--r-- | stdio-common/tst-wc-printf.c | 7 |
15 files changed, 75 insertions, 30 deletions
diff --git a/stdio-common/test-fseek.c b/stdio-common/test-fseek.c index fe57df6ac7..8a7f1ae722 100644 --- a/stdio-common/test-fseek.c +++ b/stdio-common/test-fseek.c @@ -19,8 +19,8 @@ #define TESTFILE "/tmp/test.dat" -int -main (void) +static int +do_test (void) { FILE *fp; int i, j; @@ -82,3 +82,6 @@ main (void) puts ((i > 255) ? "Test succeeded." : "Test FAILED!"); return (i > 255) ? 0 : 1; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/stdio-common/test-popen.c b/stdio-common/test-popen.c index d36cd61b4c..1f1c88acc6 100644 --- a/stdio-common/test-popen.c +++ b/stdio-common/test-popen.c @@ -49,8 +49,8 @@ read_data (FILE *stream) } } -int -main (void) +static int +do_test (void) { FILE *output, *input; int wstatus, rstatus; @@ -100,3 +100,6 @@ main (void) puts (wstatus | rstatus ? "Test FAILED!" : "Test succeeded."); return (wstatus | rstatus); } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/stdio-common/test-vfprintf.c b/stdio-common/test-vfprintf.c index a936c2804d..9cc56d7dcb 100644 --- a/stdio-common/test-vfprintf.c +++ b/stdio-common/test-vfprintf.c @@ -36,8 +36,8 @@ const char *locs[] = char large[50000]; -int -main (void) +static int +do_test (void) { char buf[25]; size_t i; @@ -124,3 +124,6 @@ main (void) return res; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/stdio-common/tst-cookie.c b/stdio-common/tst-cookie.c index dcdabf3230..030e684562 100644 --- a/stdio-common/tst-cookie.c +++ b/stdio-common/tst-cookie.c @@ -63,8 +63,8 @@ cookieclose (void *cookie) } -int -main (void) +static int +do_test (void) { cookie_io_functions_t fcts; char buf[1]; @@ -90,3 +90,6 @@ main (void) return errors != 0; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/stdio-common/tst-fileno.c b/stdio-common/tst-fileno.c index a0c8853b85..753df9f68b 100644 --- a/stdio-common/tst-fileno.c +++ b/stdio-common/tst-fileno.c @@ -28,10 +28,13 @@ check (const char *name, FILE *stream, int fd) return sfd != fd; } -int -main (void) +static int +do_test (void) { return (check ("stdin", stdin, STDIN_FILENO) || check ("stdout", stdout, STDOUT_FILENO) || check ("stderr", stderr, STDERR_FILENO)); } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/stdio-common/tst-gets.c b/stdio-common/tst-gets.c index 7f78fc1283..052f1f926a 100644 --- a/stdio-common/tst-gets.c +++ b/stdio-common/tst-gets.c @@ -21,8 +21,8 @@ #include <string.h> -int -main (void) +static int +do_test (void) { char buf[100]; int result = 0; @@ -61,3 +61,6 @@ main (void) return result; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/stdio-common/tst-obprintf.c b/stdio-common/tst-obprintf.c index 39e8fdab6f..51515932ad 100644 --- a/stdio-common/tst-obprintf.c +++ b/stdio-common/tst-obprintf.c @@ -4,8 +4,8 @@ #include <stdlib.h> -int -main (void) +static int +do_test (void) { struct obstack ob; int n; @@ -40,3 +40,6 @@ main (void) return 0; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/stdio-common/tst-perror.c b/stdio-common/tst-perror.c index b809c2fc40..416b120b8d 100644 --- a/stdio-common/tst-perror.c +++ b/stdio-common/tst-perror.c @@ -24,8 +24,8 @@ #define WC_EXP_LEN (sizeof (WC_EXP) - 1) -int -main (void) +static int +do_test (void) { int fd; char fname[] = "/tmp/tst-perror.XXXXXX"; @@ -152,3 +152,6 @@ main (void) return result; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/stdio-common/tst-sprintf.c b/stdio-common/tst-sprintf.c index c4e911fe94..2fe373f350 100644 --- a/stdio-common/tst-sprintf.c +++ b/stdio-common/tst-sprintf.c @@ -4,8 +4,8 @@ #include <string.h> -int -main (void) +static int +do_test (void) { char buf[100]; int result = 0; @@ -73,3 +73,6 @@ main (void) return result; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/stdio-common/tst-sprintf2.c b/stdio-common/tst-sprintf2.c index 422278dd6a..0ddf15ba33 100644 --- a/stdio-common/tst-sprintf2.c +++ b/stdio-common/tst-sprintf2.c @@ -3,8 +3,8 @@ #include <stdio.h> #include <string.h> -int -main (void) +static int +do_test (void) { #if LDBL_MANT_DIG >= 106 volatile union { long double l; long long x[2]; } u, v; @@ -82,3 +82,6 @@ main (void) #endif return result; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/stdio-common/tst-sprintf3.c b/stdio-common/tst-sprintf3.c index e54b23b167..e927761091 100644 --- a/stdio-common/tst-sprintf3.c +++ b/stdio-common/tst-sprintf3.c @@ -22,8 +22,8 @@ #include <stdio.h> #include <string.h> -int -main (void) +static int +do_test (void) { #if LDBL_MANT_DIG >= 106 volatile union { long double l; long long x[2]; } u, v; @@ -88,3 +88,6 @@ main (void) #endif return result; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/stdio-common/tst-swprintf.c b/stdio-common/tst-swprintf.c index e65234b1c2..ce62c6bf68 100644 --- a/stdio-common/tst-swprintf.c +++ b/stdio-common/tst-swprintf.c @@ -12,8 +12,8 @@ const char input[] = "\x8e\xa1g\x8e\xa2h\x8e\xa3i\x8e\xa4j"; -int -main (void) +static int +do_test (void) { wchar_t buf[1000]; #define nbuf (sizeof (buf) / sizeof (buf[0])) @@ -54,3 +54,6 @@ swprintf (.., .., L\"%ls\", \"%ls\") produced \"%ls\", not \"%ls\"\n", \ return result; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/stdio-common/tst-tmpnam.c b/stdio-common/tst-tmpnam.c index a3bd9fb90c..3b97064182 100644 --- a/stdio-common/tst-tmpnam.c +++ b/stdio-common/tst-tmpnam.c @@ -19,8 +19,8 @@ #include <stdlib.h> #include <string.h> -int -main (void) +static int +do_test (void) { const char *name; int retval = 0; @@ -48,3 +48,6 @@ main (void) return retval; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/stdio-common/tst-unbputc.c b/stdio-common/tst-unbputc.c index bbd8622b03..7200a82a2a 100644 --- a/stdio-common/tst-unbputc.c +++ b/stdio-common/tst-unbputc.c @@ -1,11 +1,14 @@ #include <stdio.h> -int -main (void) +static int +do_test (void) { putc ('1', stderr); putc ('2', stderr); return 0; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/stdio-common/tst-wc-printf.c b/stdio-common/tst-wc-printf.c index abbeeb5330..2a2acb5059 100644 --- a/stdio-common/tst-wc-printf.c +++ b/stdio-common/tst-wc-printf.c @@ -4,8 +4,8 @@ #include <string.h> #include <wctype.h> -int -main (void) +static int +do_test (void) { wchar_t tmp[3]; tmp[0] = '8'; @@ -20,3 +20,6 @@ main (void) return 0; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" |