X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Funictype%2Ftest-numeric.c;h=d60238317006f8938558a621dd98222271f3c36c;hb=395f9e6a19b504609aa8b0bd7f8cc55d4547d8dd;hp=5bca3638d1f058687331ece11300c1f3da4af8a9;hpb=e220635fc952c63b533873f2af39ec76aed4b4e3;p=gnulib.git diff --git a/tests/unictype/test-numeric.c b/tests/unictype/test-numeric.c index 5bca3638d..d60238317 100644 --- a/tests/unictype/test-numeric.c +++ b/tests/unictype/test-numeric.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,22 +18,9 @@ #include "unictype.h" -#include -#include #include -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ - while (0) -#define SIZEOF(a) (sizeof(a) / sizeof(a[0])) +#include "macros.h" static const struct { unsigned int ch; int numerator; int denominator; } mapping[] = @@ -52,14 +39,14 @@ main () for (i = 0; i < SIZEOF (mapping); i++) { for (; c < mapping[i].ch; c++) - { - value = uc_numeric_value (c); - ASSERT (value.numerator == 0 && value.denominator == 0); - } + { + value = uc_numeric_value (c); + ASSERT (value.numerator == 0 && value.denominator == 0); + } /* Here c = mapping[i].ch. */ value = uc_numeric_value (c); ASSERT (value.numerator == mapping[i].numerator - && value.denominator == mapping[i].denominator); + && value.denominator == mapping[i].denominator); c++; } for (; c < 0x110000; c++)