projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unistr/u*-next: Add missing dependencies.
[gnulib.git]
/
tests
/
test-filevercmp.c
diff --git
a/tests/test-filevercmp.c
b/tests/test-filevercmp.c
index
14426a6
..
fc68b9c
100644
(file)
--- a/
tests/test-filevercmp.c
+++ b/
tests/test-filevercmp.c
@@
-1,5
+1,5
@@
/* Test of filevercmp() function.
/* Test of filevercmp() function.
- Copyright (C) 2008-20
09
Free Software Foundation, Inc.
+ Copyright (C) 2008-20
10
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
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
@@
-19,20
+19,9
@@
#include "filevercmp.h"
#include "filevercmp.h"
-#include <stdio.h>
-#include <stdlib.h>
+#include <stddef.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* set of well sorted examples */
static const char *const examples[] =
/* set of well sorted examples */
static const char *const examples[] =
@@
-117,15
+106,15
@@
main (void)
{
const char *const *j;
for (j = examples; *j; j++)
{
const char *const *j;
for (j = examples; *j; j++)
- {
- int result = filevercmp (*i, *j);
- if (result < 0)
- ASSERT (i < j);
- else if (0 < result)
- ASSERT (j < i);
- else
- ASSERT (i == j);
- }
+
{
+
int result = filevercmp (*i, *j);
+
if (result < 0)
+
ASSERT (i < j);
+
else if (0 < result)
+
ASSERT (j < i);
+
else
+
ASSERT (i == j);
+
}
}
return 0;
}
return 0;