Use test-skeleton.c.

This commit is contained in:
Ulrich Drepper 2003-03-17 19:21:04 +00:00
parent 5a0e429dd8
commit 4c7e2bb082
2 changed files with 14 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2002 Free Software Foundation, Inc. /* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@ -29,7 +29,7 @@
#define OPT_TOPLEVEL 304 #define OPT_TOPLEVEL 304
static const struct argp_option options[] = static const struct argp_option test_options[] =
{ {
{ NULL, 0, NULL, 0, "\ { NULL, 0, NULL, 0, "\
This is a test for threads so we allow ther user to selection the number of \ This is a test for threads so we allow ther user to selection the number of \
@ -89,12 +89,12 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state);
/* Data structure to communicate with argp functions. */ /* Data structure to communicate with argp functions. */
static struct argp argp = static struct argp argp =
{ {
options, parse_opt test_options, parse_opt
}; };
int static int
main (void) do_test (void)
{ {
int argc = 2; int argc = 2;
char *argv[3] = { (char *) "tst-argp1", (char *) "--help", NULL }; char *argv[3] = { (char *) "tst-argp1", (char *) "--help", NULL };
@ -113,3 +113,6 @@ parse_opt (int key, char *arg, struct argp_state *state)
{ {
return ARGP_ERR_UNKNOWN; return ARGP_ERR_UNKNOWN;
} }
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"

View File

@ -1,5 +1,5 @@
/* Tests of C and POSIX locale contents. /* Tests of C and POSIX locale contents.
Copyright (C) 2000,01,02 Free Software Foundation, Inc. Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2000. Contributed by Ulrich Drepper <drepper@redhat.com>, 2000.
@ -450,8 +450,8 @@ run_test (const char *locname)
} }
int static int
main (void) do_test (void)
{ {
int result; int result;
@ -475,3 +475,6 @@ main (void)
return result; return result;
} }
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"