summaryrefslogtreecommitdiff
path: root/tests/test-mbsstr1.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2009-12-10 20:28:30 +0100
committerBruno Haible <bruno@clisp.org>2009-12-10 20:28:30 +0100
commit441aa3044f43e5572f58c354f01e6bc070acd5c7 (patch)
treebef236e8058dd3469da28ffcd5a6a287222a4c50 /tests/test-mbsstr1.c
parent039ae97b8ae35a2446c5d62d72b21689c97da7e2 (diff)
downloadgnulib-441aa3044f43e5572f58c354f01e6bc070acd5c7.tar.gz
Use spaces for indentation, not tabs.
Diffstat (limited to 'tests/test-mbsstr1.c')
-rw-r--r--tests/test-mbsstr1.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/tests/test-mbsstr1.c b/tests/test-mbsstr1.c
index 33aae10612..23e1dbec09 100644
--- a/tests/test-mbsstr1.c
+++ b/tests/test-mbsstr1.c
@@ -24,15 +24,15 @@
#include <stdlib.h>
#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
+ do \
+ { \
+ if (!(expr)) \
+ { \
fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
+ fflush (stderr); \
+ abort (); \
+ } \
+ } \
while (0)
int
@@ -75,16 +75,16 @@ main ()
char *haystack = (char *) malloc (m + 1);
if (haystack != NULL)
{
- memset (haystack, 'A', m);
- haystack[0] = 'B';
- haystack[m] = '\0';
+ memset (haystack, 'A', m);
+ haystack[0] = 'B';
+ haystack[m] = '\0';
- for (; repeat > 0; repeat--)
- {
- ASSERT (mbsstr (haystack, needle) == haystack + 1);
- }
+ for (; repeat > 0; repeat--)
+ {
+ ASSERT (mbsstr (haystack, needle) == haystack + 1);
+ }
- free (haystack);
+ free (haystack);
}
}
@@ -99,15 +99,15 @@ main ()
char *needle = (char *) malloc (m + 1);
if (needle != NULL)
{
- memset (needle, 'A', m);
- needle[m] = '\0';
+ memset (needle, 'A', m);
+ needle[m] = '\0';
- for (; repeat > 0; repeat--)
- {
- ASSERT (mbsstr (haystack, needle) == NULL);
- }
+ for (; repeat > 0; repeat--)
+ {
+ ASSERT (mbsstr (haystack, needle) == NULL);
+ }
- free (needle);
+ free (needle);
}
}
@@ -118,18 +118,18 @@ main ()
char *needle = (char *) malloc (m + 2);
if (haystack != NULL && needle != NULL)
{
- const char *result;
+ const char *result;
- memset (haystack, 'A', 2 * m);
- haystack[2 * m] = 'B';
- haystack[2 * m + 1] = '\0';
+ memset (haystack, 'A', 2 * m);
+ haystack[2 * m] = 'B';
+ haystack[2 * m + 1] = '\0';
- memset (needle, 'A', m);
- needle[m] = 'B';
- needle[m + 1] = '\0';
+ memset (needle, 'A', m);
+ needle[m] = 'B';
+ needle[m + 1] = '\0';
- result = mbsstr (haystack, needle);
- ASSERT (result == haystack + m);
+ result = mbsstr (haystack, needle);
+ ASSERT (result == haystack + m);
}
free (needle);
free (haystack);