projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix typo which cause the binary not to depend upon any libraries
[pspp]
/
tests
/
libpspp
/
llx-test.c
diff --git
a/tests/libpspp/llx-test.c
b/tests/libpspp/llx-test.c
index 1b069a212efef60f8f3177fd279e6d2ae5aa0021..f825a3a420242f30691a071c471c7097589f2a1c 100644
(file)
--- a/
tests/libpspp/llx-test.c
+++ b/
tests/libpspp/llx-test.c
@@
-27,6
+27,10
@@
See ll-test.c for a similar program for the ll_* routines. */
See ll-test.c for a similar program for the ll_* routines. */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <libpspp/llx.h>
#include <assert.h>
#include <stdio.h>
#include <libpspp/llx.h>
#include <assert.h>
#include <stdio.h>
@@
-225,7
+229,7
@@
static bool
pattern_pred (const void *element_, void *pattern_)
{
const struct element *element = element_;
pattern_pred (const void *element_, void *pattern_)
{
const struct element *element = element_;
- unsigned *pattern = pattern_;
+ unsigned
int
*pattern = pattern_;
return (*pattern & (1u << element->x)) != 0;
}
return (*pattern & (1u << element->x)) != 0;
}
@@
-1007,10
+1011,10
@@
test_count_if (void)
}
/* Returns N!. */
}
/* Returns N!. */
-static unsigned
-factorial (unsigned n)
+static unsigned
int
+factorial (unsigned
int
n)
{
{
- unsigned value = 1;
+ unsigned
int
value = 1;
while (n > 1)
value *= n--;
return value;
while (n > 1)
value *= n--;
return value;
@@
-1019,11
+1023,11
@@
factorial (unsigned n)
/* Returns the number of permutations of the CNT values in
VALUES. If VALUES contains duplicates, they must be
adjacent. */
/* Returns the number of permutations of the CNT values in
VALUES. If VALUES contains duplicates, they must be
adjacent. */
-static unsigned
+static unsigned
int
expected_perms (int *values, size_t cnt)
{
size_t i, j;
expected_perms (int *values, size_t cnt)
{
size_t i, j;
- unsigned perm_cnt;
+ unsigned
int
perm_cnt;
perm_cnt = factorial (cnt);
for (i = 0; i < cnt; i = j)
perm_cnt = factorial (cnt);
for (i = 0; i < cnt; i = j)
@@
-1362,7
+1366,7
@@
test_permutations_with_dups (void)
int *old_values = xnmalloc (max_elems, sizeof *values);
int *new_values = xnmalloc (max_elems, sizeof *values);
int *old_values = xnmalloc (max_elems, sizeof *values);
int *new_values = xnmalloc (max_elems, sizeof *values);
- unsigned permutation_cnt;
+ unsigned
int
permutation_cnt;
int left = cnt;
int value = 0;
int left = cnt;
int value = 0;
@@
-1929,7
+1933,7
@@
test_partition (void)
const int max_elems = 10;
int cnt;
const int max_elems = 10;
int cnt;
- unsigned pbase;
+ unsigned
int
pbase;
int r0, r1;
for (cnt = 0; cnt < max_elems; cnt++)
int r0, r1;
for (cnt = 0; cnt < max_elems; cnt++)
@@
-1942,7
+1946,7
@@
test_partition (void)
struct llx **elemp;
int *values;
struct llx **elemp;
int *values;
- unsigned pattern = pbase << r0;
+ unsigned
int
pattern = pbase << r0;
int i, j;
int first_false;
struct llx *part_llx;
int i, j;
int first_false;
struct llx *part_llx;