/* Test of <wctype.h> substitute.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <wctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Check that the type wint_t is defined. */
wint_t a = 'x';
/* Check that the isw* functions exist as functions or as macros. */
(void) iswalnum (0);
(void) iswalpha (0);
-#if 0 /* not portable: missing on mingw */
(void) iswblank (0);
-#endif
(void) iswcntrl (0);
(void) iswdigit (0);
(void) iswgraph (0);
/* Check that the isw* functions map WEOF to 0. */
ASSERT (!iswalnum (e));
ASSERT (!iswalpha (e));
-#if 0 /* not portable: missing on mingw */
ASSERT (!iswblank (e));
-#endif
ASSERT (!iswcntrl (e));
ASSERT (!iswdigit (e));
ASSERT (!iswgraph (e));