aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test-variables.c2
-rw-r--r--test.c36
2 files changed, 19 insertions, 19 deletions
diff --git a/test-variables.c b/test-variables.c
index 0049aad..c8c3ea7 100644
--- a/test-variables.c
+++ b/test-variables.c
@@ -46,7 +46,7 @@ main(void)
size_t count1 = 0, count2 = 1, count;
size_t i, j;
- assert(vars = libenv_get_complete_list(NULL, NULL));
+ assert((vars = libenv_get_complete_list(NULL, NULL)));
assert(vars == libenv_get_complete_list(&nclasswords1, NULL));
assert(vars == libenv_get_complete_list(NULL, &count1));
assert(vars == libenv_get_complete_list(&nclasswords2, &count2));
diff --git a/test.c b/test.c
index 5a5017e..da565c4 100644
--- a/test.c
+++ b/test.c
@@ -64,13 +64,13 @@ check(size_t count, char **strings, ...)
char *allocations[8];\
size_t i;\
char *p;\
- assert(strings[0] = allocations[0] = strdup("a="));\
- assert(strings[1] = allocations[1] = strdup("aa=1"));\
- assert(strings[2] = allocations[2] = strdup("b=12"));\
- assert(strings[3] = allocations[3] = strdup("bb=34"));\
- assert(strings[4] = allocations[4] = strdup("BB"));\
- assert(strings[5] = allocations[5] = strdup("x=5"));\
- assert(strings[6] = allocations[6] = strdup("xx"));\
+ assert((strings[0] = allocations[0] = strdup("a=")));\
+ assert((strings[1] = allocations[1] = strdup("aa=1")));\
+ assert((strings[2] = allocations[2] = strdup("b=12")));\
+ assert((strings[3] = allocations[3] = strdup("bb=34")));\
+ assert((strings[4] = allocations[4] = strdup("BB")));\
+ assert((strings[5] = allocations[5] = strdup("x=5")));\
+ assert((strings[6] = allocations[6] = strdup("xx")));\
strings[7] = allocations[7] = NULL;\
if (!variable_version) {\
for (i = 0; strings[i]; i++) {\
@@ -128,11 +128,11 @@ test_get_chosen_list(void) /* TODO check memory failure behaviour */
{
const char **r;
- assert(r = libenv_get_chosen_list(LIBENV_END));
+ assert((r = libenv_get_chosen_list(LIBENV_END)));
assert(!r[0]);
free(r);
- assert(r = libenv_get_chosen_list(1, LIBENV_END));
+ assert((r = libenv_get_chosen_list(1, LIBENV_END)));
assert(r[0] && !strcmp(r[0], "a"));
assert(r[1] && !strcmp(r[1], "aa"));
assert(r[2] && !strcmp(r[2], "BB"));
@@ -140,19 +140,19 @@ test_get_chosen_list(void) /* TODO check memory failure behaviour */
assert(!r[4]);
free(r);
- assert(r = libenv_get_chosen_list(2, LIBENV_END));
+ assert((r = libenv_get_chosen_list(2, LIBENV_END)));
assert(r[0] && !strcmp(r[0], "aa"));
assert(r[1] && !strcmp(r[1], "BB"));
assert(r[2] && !strcmp(r[2], "bb"));
assert(!r[3]);
free(r);
- assert(r = libenv_get_chosen_list(3, LIBENV_END));
+ assert((r = libenv_get_chosen_list(3, LIBENV_END)));
assert(r[0] && !strcmp(r[0], "BB"));
assert(!r[1]);
free(r);
- assert(r = libenv_get_chosen_list(1, 2, LIBENV_END));
+ assert((r = libenv_get_chosen_list(1, 2, LIBENV_END)));
assert(r[0] && !strcmp(r[0], "a"));
assert(r[1] && !strcmp(r[1], "aa"));
assert(r[2] && !strcmp(r[2], "BB"));
@@ -161,14 +161,14 @@ test_get_chosen_list(void) /* TODO check memory failure behaviour */
assert(!r[5]);
free(r);
- assert(r = libenv_get_chosen_list(2, 3, LIBENV_END));
+ assert((r = libenv_get_chosen_list(2, 3, LIBENV_END)));
assert(r[0] && !strcmp(r[0], "aa"));
assert(r[1] && !strcmp(r[1], "BB"));
assert(r[2] && !strcmp(r[2], "bb"));
assert(!r[3]);
free(r);
- assert(r = libenv_get_chosen_list(3, 1, LIBENV_END));
+ assert((r = libenv_get_chosen_list(3, 1, LIBENV_END)));
assert(r[0] && !strcmp(r[0], "a"));
assert(r[1] && !strcmp(r[1], "aa"));
assert(r[2] && !strcmp(r[2], "BB"));
@@ -176,7 +176,7 @@ test_get_chosen_list(void) /* TODO check memory failure behaviour */
assert(!r[4]);
free(r);
- assert(r = libenv_get_chosen_list(1, 2, 3, LIBENV_END));
+ assert((r = libenv_get_chosen_list(1, 2, 3, LIBENV_END)));
assert(r[0] && !strcmp(r[0], "a"));
assert(r[1] && !strcmp(r[1], "aa"));
assert(r[2] && !strcmp(r[2], "BB"));
@@ -185,15 +185,15 @@ test_get_chosen_list(void) /* TODO check memory failure behaviour */
assert(!r[5]);
free(r);
- assert(r = libenv_get_chosen_list(10, LIBENV_END));
+ assert((r = libenv_get_chosen_list(10, LIBENV_END)));
assert(!r[0]);
free(r);
- assert(r = libenv_get_chosen_list(64, LIBENV_END));
+ assert((r = libenv_get_chosen_list(64, LIBENV_END)));
assert(!r[0]);
free(r);
- assert(r = libenv_get_chosen_list(1000, LIBENV_END));
+ assert((r = libenv_get_chosen_list(1000, LIBENV_END)));
assert(!r[0]);
free(r);
}