X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Funictype%2Ftest-block_of.c;h=230fa87d44d88dc9a9e63b3cf4edc70bc3c96ffa;hb=5b9e0c3ce734b9d9b0c0001e31b65a8a4713700d;hp=7c73a165d1816136a658aac0eeddc323e7fbc1a3;hpb=a635ca9c01d6e9a747ac9c0c2eed04658486d400;p=gnulib.git diff --git a/tests/unictype/test-block_of.c b/tests/unictype/test-block_of.c index 7c73a165d..230fa87d4 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 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,20 +18,9 @@ #include "unictype.h" -#include -#include #include -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - abort (); \ - } \ - } \ - while (0) +#include "macros.h" int main () @@ -44,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)); } } @@ -58,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]); } }