/* Test of case-insensitive memory area comparison function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-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 <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"
switch (argv[1][0])
{
case '1':
- /* Locale encoding is ISO-8859-1 or ISO-8859-15. */
- test_iso_8859_1 (mbmemcasecmp, true);
- return 0;
+ /* Locale encoding is ISO-8859-1 or ISO-8859-15. */
+ test_iso_8859_1 (mbmemcasecmp, true);
+ return 0;
case '2':
- /* Locale encoding is UTF-8, locale is not Turkish. */
- test_utf_8 (mbmemcasecmp, false);
- return 0;
+ /* Locale encoding is UTF-8, locale is not Turkish. */
+ test_utf_8 (mbmemcasecmp, false);
+ return 0;
case '3':
- /* Locale encoding is UTF-8, locale is Turkish. */
- test_utf_8 (mbmemcasecmp, true);
- return 0;
+ /* Locale encoding is UTF-8, locale is Turkish. */
+ test_utf_8 (mbmemcasecmp, true);
+ return 0;
}
return 1;