* locale/tst-C-locale.c (run_test): Remove __ from function names.

This commit is contained in:
Roland McGrath 2002-08-28 08:44:40 +00:00
parent f6056d40d8
commit 4a42ea75da
3 changed files with 27 additions and 18 deletions

View File

@ -1,3 +1,7 @@
2002-08-28 Roland McGrath <roland@redhat.com>
* locale/tst-C-locale.c (run_test): Remove __ from function names.
2002-08-28 Jakub Jelinek <jakub@redhat.com> 2002-08-28 Jakub Jelinek <jakub@redhat.com>
Roland McGrath <roland@redhat.com> Roland McGrath <roland@redhat.com>

View File

@ -1,5 +1,5 @@
/* Tests of C and POSIX locale contents. /* Tests of C and POSIX locale contents.
Copyright (C) 2000, 2001 Free Software Foundation, Inc. Copyright (C) 2000,01,02 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.
@ -35,7 +35,7 @@ run_test (const char *locname)
const char *str; const char *str;
const wchar_t *wstr; const wchar_t *wstr;
int result = 0; int result = 0;
__locale_t loc; locale_t loc;
/* ISO C stuff. */ /* ISO C stuff. */
lc = localeconv (); lc = localeconv ();
@ -223,7 +223,7 @@ run_test (const char *locname)
STRTEST (NOSTR, ""); STRTEST (NOSTR, "");
/* Test the new locale mechanisms. */ /* Test the new locale mechanisms. */
loc = __newlocale (LC_ALL, locname, NULL); loc = newlocale (LC_ALL, locname, NULL);
if (loc == NULL) if (loc == NULL)
{ {
printf ("cannot create locale object for locale %s\n", locname); printf ("cannot create locale object for locale %s\n", locname);
@ -235,19 +235,19 @@ run_test (const char *locname)
#undef STRTEST #undef STRTEST
#define STRTEST(name, exp) \ #define STRTEST(name, exp) \
str = __nl_langinfo_l (name, loc); \ str = nl_langinfo_l (name, loc); \
if (strcmp (str, exp) != 0) \ if (strcmp (str, exp) != 0) \
{ \ { \
printf ("__nl_langinfo_l(" #name ") in locale %s wrong " \ printf ("nl_langinfo_l(" #name ") in locale %s wrong " \
"(is \"%s\", should be \"%s\")\n", locname, str, exp); \ "(is \"%s\", should be \"%s\")\n", locname, str, exp); \
result = 1; \ result = 1; \
} }
#undef WSTRTEST #undef WSTRTEST
#define WSTRTEST(name, exp) \ #define WSTRTEST(name, exp) \
wstr = (wchar_t *) __nl_langinfo_l (name, loc); \ wstr = (wchar_t *) nl_langinfo_l (name, loc); \
if (wcscmp (wstr, exp) != 0) \ if (wcscmp (wstr, exp) != 0) \
{ \ { \
printf ("__nl_langinfo_l(" #name ") in locale %s wrong " \ printf ("nl_langinfo_l(" #name ") in locale %s wrong " \
"(is \"%S\", should be \"%S\")\n", locname, wstr, exp); \ "(is \"%S\", should be \"%S\")\n", locname, wstr, exp); \
result = 1; \ result = 1; \
} }
@ -369,9 +369,9 @@ run_test (const char *locname)
for (c = 0; c < 128; ++c) for (c = 0; c < 128; ++c)
{ {
#define CLASSTEST(name) \ #define CLASSTEST(name) \
if (is##name (c) != __is##name##_l (c, loc)) \ if (is##name (c) != is##name##_l (c, loc)) \
{ \ { \
printf ("is%s('\\%o') != __is%s_l('\\%o')\n", \ printf ("is%s('\\%o') != is%s_l('\\%o')\n", \
#name, c, #name, c); \ #name, c, #name, c); \
result = 1; \ result = 1; \
} }
@ -390,11 +390,11 @@ run_test (const char *locname)
/* Character mapping tests. */ /* Character mapping tests. */
#define MAPTEST(name) \ #define MAPTEST(name) \
if (to##name (c) != __to##name##_l (c, loc)) \ if (to##name (c) != to##name##_l (c, loc)) \
{ \ { \
printf ("to%s('\\%o') != __to%s_l('\\%o'): '\\%o' vs '\\%o'\n", \ printf ("to%s('\\%o') != to%s_l('\\%o'): '\\%o' vs '\\%o'\n", \
#name, c, #name, c, \ #name, c, #name, c, \
to##name (c), __to##name##_l (c, loc)); \ to##name (c), to##name##_l (c, loc)); \
result = 1; \ result = 1; \
} }
MAPTEST (lower); MAPTEST (lower);
@ -408,9 +408,9 @@ run_test (const char *locname)
{ {
#undef CLASSTEST #undef CLASSTEST
#define CLASSTEST(name) \ #define CLASSTEST(name) \
if (isw##name (c) != __isw##name##_l (c, loc)) \ if (isw##name (c) != isw##name##_l (c, loc)) \
{ \ { \
printf ("isw%s('\\%o') != __isw%s_l('\\%o')\n", \ printf ("isw%s('\\%o') != isw%s_l('\\%o')\n", \
#name, c, #name, c); \ #name, c, #name, c); \
result = 1; \ result = 1; \
} }
@ -432,18 +432,18 @@ run_test (const char *locname)
UCS4. */ UCS4. */
#undef MAPTEST #undef MAPTEST
#define MAPTEST(name) \ #define MAPTEST(name) \
if (tow##name (c) != __tow##name##_l (c, loc)) \ if (tow##name (c) != tow##name##_l (c, loc)) \
{ \ { \
printf ("tow%s('\\%o') != __tow%s_l('\\%o'): '\\%o' vs '\\%o'\n",\ printf ("tow%s('\\%o') != tow%s_l('\\%o'): '\\%o' vs '\\%o'\n",\
#name, c, #name, c, \ #name, c, #name, c, \
tow##name (c), __tow##name##_l (c, loc)); \ tow##name (c), tow##name##_l (c, loc)); \
result = 1; \ result = 1; \
} }
MAPTEST (lower); MAPTEST (lower);
MAPTEST (upper); MAPTEST (upper);
} }
__freelocale (loc); freelocale (loc);
} }
return result; return result;

View File

@ -1,3 +1,8 @@
2002-08-28 Roland McGrath <roland@redhat.com>
* tst-xlocale1.c (main): Remove __ from function names.
* tst-xlocale2.c: Likewise.
2002-08-25 Ulrich Drepper <drepper@redhat.com> 2002-08-25 Ulrich Drepper <drepper@redhat.com>
* tests-mbwc/tst_mbrlen.c: Use correct format in test result printing * tests-mbwc/tst_mbrlen.c: Use correct format in test result printing