/* Test of decomposition of Unicode characters.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
#include "uninorm.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#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 ()
/* HANGUL SYLLABLE GEUL */
ret = uc_decomposition (0xAE00, &tag, decomposed);
+ /* See the clarification at <http://www.unicode.org/versions/Unicode5.1.0/>,
+ section "Clarification of Hangul Jamo Handling". */
+#if 1
+ ASSERT (ret == 2);
+ ASSERT (tag == UC_DECOMP_CANONICAL);
+ ASSERT (decomposed[0] == 0xADF8);
+ ASSERT (decomposed[1] == 0x11AF);
+#else
ASSERT (ret == 3);
ASSERT (tag == UC_DECOMP_CANONICAL);
ASSERT (decomposed[0] == 0x1100);
ASSERT (decomposed[1] == 0x1173);
ASSERT (decomposed[2] == 0x11AF);
+#endif
/* HANGUL SYLLABLE GEU */
ret = uc_decomposition (0xADF8, &tag, decomposed);