X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Funiwidth%2Ftest-u16-strwidth.c;h=5ad9dfd26adb820f6a8beb39460fc407eb284e45;hb=69be788393cc7d52413d9d2782117326d4c15899;hp=79351f62a0d30745b70e0e5c9e200a0c411b43c7;hpb=57fdfd3f8ec62b105c53bcdf6f127c35c7fe7391;p=gnulib.git diff --git a/tests/uniwidth/test-u16-strwidth.c b/tests/uniwidth/test-u16-strwidth.c index 79351f62a..5ad9dfd26 100644 --- a/tests/uniwidth/test-u16-strwidth.c +++ b/tests/uniwidth/test-u16-strwidth.c @@ -1,5 +1,5 @@ /* Test of u16_strwidth() function. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007-2011 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 @@ -20,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 () @@ -52,8 +40,8 @@ main () { static const uint16_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 (u16_strwidth (input, "UTF-8") == 12); ASSERT (u16_strwidth (input, "EUC-JP") == 23);