comparison tests/uninorm/test-u16-nfkd.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
21 #if GNULIB_UNINORM_U16_NORMALIZE 21 #if GNULIB_UNINORM_U16_NORMALIZE
22 22
23 #include "uninorm.h" 23 #include "uninorm.h"
24 24
25 #include <signal.h> 25 #include <signal.h>
26 #include <stdio.h>
27 #include <stdlib.h> 26 #include <stdlib.h>
28 #include <unistd.h> 27 #include <unistd.h>
29 28
30 #include "unistr.h" 29 #include "unistr.h"
31 30 #include "macros.h"
32 #define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
33 #define ASSERT(expr) \
34 do \
35 { \
36 if (!(expr)) \
37 { \
38 fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
39 fflush (stderr); \
40 abort (); \
41 } \
42 } \
43 while (0)
44 31
45 static int 32 static int
46 check (const uint16_t *input, size_t input_length, 33 check (const uint16_t *input, size_t input_length,
47 const uint16_t *expected, size_t expected_length) 34 const uint16_t *expected, size_t expected_length)
48 { 35 {