OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [newlib/] [testsuite/] [newlib.wctype/] [tiswctype.c] - Diff between revs 158 and 816

Only display areas with differences | Details | Blame | View Log

Rev 158 Rev 816
#include <wctype.h>
#include <wctype.h>
#include <newlib.h>
#include <newlib.h>
#include "check.h"
#include "check.h"
 
 
int main()
int main()
{
{
  wctype_t x;
  wctype_t x;
 
 
  x = wctype ("alpha");
  x = wctype ("alpha");
  CHECK (x != 0);
  CHECK (x != 0);
  CHECK (iswctype (L'a', x) && isalpha ('a'));
  CHECK (iswctype (L'a', x) && isalpha ('a'));
 
 
  x = wctype ("alnum");
  x = wctype ("alnum");
  CHECK (x != 0);
  CHECK (x != 0);
  CHECK (iswctype (L'0', x) && isalnum ('0'));
  CHECK (iswctype (L'0', x) && isalnum ('0'));
 
 
  x = wctype ("blank");
  x = wctype ("blank");
  CHECK (x != 0);
  CHECK (x != 0);
  CHECK (iswctype (L' ', x) && isblank (' '));
  CHECK (iswctype (L' ', x) && isblank (' '));
 
 
  x = wctype ("cntrl");
  x = wctype ("cntrl");
  CHECK (x != 0);
  CHECK (x != 0);
  CHECK (iswctype (L'\n', x) && iscntrl ('\n'));
  CHECK (iswctype (L'\n', x) && iscntrl ('\n'));
 
 
  x = wctype ("digit");
  x = wctype ("digit");
  CHECK (x != 0);
  CHECK (x != 0);
  CHECK (iswctype (L'7', x) && isdigit ('7'));
  CHECK (iswctype (L'7', x) && isdigit ('7'));
 
 
  x = wctype ("graph");
  x = wctype ("graph");
  CHECK (x != 0);
  CHECK (x != 0);
  CHECK (iswctype (L'!', x) && isgraph ('!'));
  CHECK (iswctype (L'!', x) && isgraph ('!'));
 
 
  x = wctype ("lower");
  x = wctype ("lower");
  CHECK (x != 0);
  CHECK (x != 0);
  CHECK (iswctype (L'k', x) && islower ('k'));
  CHECK (iswctype (L'k', x) && islower ('k'));
 
 
  x = wctype ("print");
  x = wctype ("print");
  CHECK (x != 0);
  CHECK (x != 0);
  CHECK (iswctype (L'@', x) && isprint ('@'));
  CHECK (iswctype (L'@', x) && isprint ('@'));
 
 
  x = wctype ("punct");
  x = wctype ("punct");
  CHECK (x != 0);
  CHECK (x != 0);
  CHECK (iswctype (L'.', x) && ispunct ('.'));
  CHECK (iswctype (L'.', x) && ispunct ('.'));
 
 
  x = wctype ("space");
  x = wctype ("space");
  CHECK (x != 0);
  CHECK (x != 0);
  CHECK (iswctype (L'\t', x) && isspace ('\t'));
  CHECK (iswctype (L'\t', x) && isspace ('\t'));
 
 
  x = wctype ("upper");
  x = wctype ("upper");
  CHECK (x != 0);
  CHECK (x != 0);
  CHECK (iswctype (L'T', x) && isupper ('T'));
  CHECK (iswctype (L'T', x) && isupper ('T'));
 
 
  x = wctype ("xdigit");
  x = wctype ("xdigit");
  CHECK (x != 0);
  CHECK (x != 0);
  CHECK (iswctype (L'B', x) && isxdigit ('B'));
  CHECK (iswctype (L'B', x) && isxdigit ('B'));
 
 
  x = wctype ("unknown");
  x = wctype ("unknown");
  CHECK (x == 0);
  CHECK (x == 0);
 
 
  exit (0);
  exit (0);
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.