Mercurial > hg > octave-nkf > gnulib-hg
comparison tests/test-c-ctype.c @ 12496:a48d3d749ca5
Refactor common macros used in tests.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Thu, 24 Dec 2009 21:01:42 +0100 |
parents | e8d2c6fc33ad |
children | c2cbabec01dd |
comparison
equal
deleted
inserted
replaced
12495:16a0ada3a101 | 12496:a48d3d749ca5 |
---|---|
1 /* Test of character handling in C locale. | 1 /* Test of character handling in C locale. |
2 Copyright (C) 2005, 2007-2008 Free Software Foundation, Inc. | 2 Copyright (C) 2005, 2007-2009 Free Software Foundation, Inc. |
3 | 3 |
4 This program is free software: you can redistribute it and/or modify | 4 This program is free software: you can redistribute it and/or modify |
5 it under the terms of the GNU General Public License as published by | 5 it under the terms of the GNU General Public License as published by |
6 the Free Software Foundation; either version 3 of the License, or | 6 the Free Software Foundation; either version 3 of the License, or |
7 (at your option) any later version. | 7 (at your option) any later version. |
19 #include <config.h> | 19 #include <config.h> |
20 | 20 |
21 #include "c-ctype.h" | 21 #include "c-ctype.h" |
22 | 22 |
23 #include <locale.h> | 23 #include <locale.h> |
24 #include <stdio.h> | 24 |
25 #include <stdlib.h> | 25 #include "macros.h" |
26 | |
27 #define ASSERT(expr) \ | |
28 do \ | |
29 { \ | |
30 if (!(expr)) \ | |
31 { \ | |
32 fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ | |
33 fflush (stderr); \ | |
34 abort (); \ | |
35 } \ | |
36 } \ | |
37 while (0) | |
38 | 26 |
39 static void | 27 static void |
40 test_all (void) | 28 test_all (void) |
41 { | 29 { |
42 int c; | 30 int c; |