maint: update all copyright year number ranges
[gnulib.git] / tests / uninorm / test-canonical-decomposition.c
index 59061c9..2529dd9 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of canonical 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 ()
@@ -133,10 +120,18 @@ main ()
 
   /* HANGUL SYLLABLE GEUL */
   ret = uc_canonical_decomposition (0xAE00, 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 (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);