summaryrefslogtreecommitdiff
path: root/tests/unictype/test-block_of.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unictype/test-block_of.c')
-rw-r--r--tests/unictype/test-block_of.c36
1 files changed, 12 insertions, 24 deletions
diff --git a/tests/unictype/test-block_of.c b/tests/unictype/test-block_of.c
index 9460cde..230fa87 100644
--- a/tests/unictype/test-block_of.c
+++ b/tests/unictype/test-block_of.c
@@ -1,5 +1,5 @@
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 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
@@ -18,21 +18,9 @@
#include "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
@@ -45,8 +33,8 @@ main ()
for (c = 0; c < 0x110000; c++)
{
- const uc_block_t *block = uc_block (c);
- ASSERT (block == NULL || uc_is_block (c, block));
+ const uc_block_t *block = uc_block (c);
+ ASSERT (block == NULL || uc_is_block (c, block));
}
}
@@ -59,19 +47,19 @@ main ()
for (i = 0; i < nblocks; i++)
{
- if (strcmp (blocks[i].name, "Hebrew") == 0)
- {
- ASSERT (uc_block (0x05DE) == &blocks[i]);
- ASSERT (uc_is_block (0x05DE, &blocks[i]));
- }
+ if (strcmp (blocks[i].name, "Hebrew") == 0)
+ {
+ ASSERT (uc_block (0x05DE) == &blocks[i]);
+ ASSERT (uc_is_block (0x05DE, &blocks[i]));
+ }
}
for (i = 0; i < nblocks; i++)
{
- unsigned int c;
+ unsigned int c;
- for (c = blocks[i].start; c <= blocks[i].end; c++)
- ASSERT (uc_block (c) == &blocks[i]);
+ for (c = blocks[i].start; c <= blocks[i].end; c++)
+ ASSERT (uc_block (c) == &blocks[i]);
}
}