install-reloc: Support multi-binary installation.
[gnulib.git] / tests / unictype / test-block_of.c
index 7c73a16..230fa87 100644 (file)
@@ -1,5 +1,5 @@
 /* Test the Unicode character type functions.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007-2009 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 "unictype.h"
 
-#include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 
-#define ASSERT(expr) \
-  do                                                                        \
-    {                                                                       \
-      if (!(expr))                                                          \
-        {                                                                   \
-          fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
-          abort ();                                                         \
-        }                                                                   \
-    }                                                                       \
-  while (0)
+#include "macros.h"
 
 int
 main ()
@@ -44,8 +33,8 @@ main ()
 
     for (c = 0; c < 0x110000; c++)
       {
-       const uc_block_t *block = uc_block (c);
-       ASSERT (block == NULL || uc_is_block (c, block));
+        const uc_block_t *block = uc_block (c);
+        ASSERT (block == NULL || uc_is_block (c, block));
       }
   }
 
@@ -58,19 +47,19 @@ main ()
 
     for (i = 0; i < nblocks; i++)
       {
-       if (strcmp (blocks[i].name, "Hebrew") == 0)
-         {
-           ASSERT (uc_block (0x05DE) == &blocks[i]);
-           ASSERT (uc_is_block (0x05DE, &blocks[i]));
-         }
+        if (strcmp (blocks[i].name, "Hebrew") == 0)
+          {
+            ASSERT (uc_block (0x05DE) == &blocks[i]);
+            ASSERT (uc_is_block (0x05DE, &blocks[i]));
+          }
       }
 
     for (i = 0; i < nblocks; i++)
       {
-       unsigned int c;
+        unsigned int c;
 
-       for (c = blocks[i].start; c <= blocks[i].end; c++)
-         ASSERT (uc_block (c) == &blocks[i]);
+        for (c = blocks[i].start; c <= blocks[i].end; c++)
+          ASSERT (uc_block (c) == &blocks[i]);
       }
   }