X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Funinorm%2Ftest-canonical-decomposition.c;h=f97bc443dea521f13ee6cc0515bf1b5c0ca033f5;hb=6fd3d63e394795d7da5189d7759907c2a305c075;hp=59061c94e70358b76e003af97abe4a0b4f43f015;hpb=293d2d3a78e857200782c941833111d6c8322b02;p=gnulib.git diff --git a/tests/uninorm/test-canonical-decomposition.c b/tests/uninorm/test-canonical-decomposition.c index 59061c94e..f97bc443d 100644 --- a/tests/uninorm/test-canonical-decomposition.c +++ b/tests/uninorm/test-canonical-decomposition.c @@ -1,5 +1,5 @@ /* Test of canonical decomposition of Unicode characters. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009, 2010 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,20 +20,7 @@ #include "uninorm.h" -#include -#include - -#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 () @@ -133,10 +120,18 @@ main () /* HANGUL SYLLABLE GEUL */ ret = uc_canonical_decomposition (0xAE00, decomposed); + /* See the clarification at , + section "Clarification of Hangul Jamo Handling". */ +#if 1 + ASSERT (ret == 2); + ASSERT (decomposed[0] == 0xADF8); + ASSERT (decomposed[1] == 0x11AF); +#else ASSERT (ret == 3); ASSERT (decomposed[0] == 0x1100); ASSERT (decomposed[1] == 0x1173); ASSERT (decomposed[2] == 0x11AF); +#endif /* HANGUL SYLLABLE GEU */ ret = uc_canonical_decomposition (0xADF8, decomposed);