maint: update copyright
[gnulib.git] / tests / test-mbmemcasecoll.c
index 94c0a48..bf6c107 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of case-insensitive memory area comparison function.
-   Copyright (C) 2007-2009 Free Software Foundation, Inc.
+   Copyright (C) 2007-2014 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 <locale.h>
 #include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
-  do                                                                        \
-    {                                                                       \
-      if (!(expr))                                                          \
-        {                                                                   \
-          fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
-          fflush (stderr);                                                  \
-          abort ();                                                         \
-        }                                                                   \
-    }                                                                       \
-  while (0)
+#include "macros.h"
 
 #include "test-mbmemcasecmp.h"
 
@@ -60,19 +47,19 @@ main (int argc, char *argv[])
     switch (argv[1][0])
       {
       case '1':
-       /* Locale encoding is ISO-8859-1 or ISO-8859-15.  */
-       test_iso_8859_1 (mbmemcasecoll_hard, false);
-       return 0;
+        /* Locale encoding is ISO-8859-1 or ISO-8859-15.  */
+        test_iso_8859_1 (mbmemcasecoll_hard, false);
+        return 0;
 
       case '2':
-       /* Locale encoding is UTF-8, locale is not Turkish.  */
-       test_utf_8 (mbmemcasecoll_hard, false);
-       return 0;
+        /* Locale encoding is UTF-8, locale is not Turkish.  */
+        test_utf_8 (mbmemcasecoll_hard, false);
+        return 0;
 
       case '3':
-       /* Locale encoding is UTF-8, locale is Turkish.  */
-       test_utf_8 (mbmemcasecoll_hard, true);
-       return 0;
+        /* Locale encoding is UTF-8, locale is Turkish.  */
+        test_utf_8 (mbmemcasecoll_hard, true);
+        return 0;
       }
 
   return 1;