X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Funiwidth%2Ftest-u32-strwidth.c;h=6f5e260c6ba1348f208fa30f79a0fa5f82d7ecaa;hb=647e7023ce05b720e9de6ccd4b8eb62836bcfb7b;hp=4c71f29c3ca0b77d7508ddd734ffe61d5e8e62d9;hpb=c7a9d83802fba1b0a30888b32eacb0aa41e0f732;p=gnulib.git diff --git a/tests/uniwidth/test-u32-strwidth.c b/tests/uniwidth/test-u32-strwidth.c index 4c71f29c3..6f5e260c6 100644 --- a/tests/uniwidth/test-u32-strwidth.c +++ b/tests/uniwidth/test-u32-strwidth.c @@ -1,10 +1,10 @@ /* Test of u32_strwidth() function. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007-2013 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ @@ -21,19 +20,7 @@ #include "uniwidth.h" -#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 () @@ -53,8 +40,8 @@ main () { static const uint32_t input[] = /* "Данило Шеган" */ { - 0x0414, 0x0430, 0x043D, 0x0438, 0x043B, 0x043E, ' ', - 0x0428, 0x0435, 0x0433, 0x0430, 0x043D, 0 + 0x0414, 0x0430, 0x043D, 0x0438, 0x043B, 0x043E, ' ', + 0x0428, 0x0435, 0x0433, 0x0430, 0x043D, 0 }; ASSERT (u32_strwidth (input, "UTF-8") == 12); ASSERT (u32_strwidth (input, "EUC-JP") == 23);