git.droids-corp.org
/
protos
/
libecoli.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rework completion iterators
[protos/libecoli.git]
/
src
/
ecoli_test.c
diff --git
a/src/ecoli_test.c
b/src/ecoli_test.c
index
4429e67
..
3e7d625
100644
(file)
--- a/
src/ecoli_test.c
+++ b/
src/ecoli_test.c
@@
-129,7
+129,6
@@
int ec_test_check_complete(struct ec_node *tk, enum ec_comp_type type, ...)
for (s = va_arg(ap, const char *);
s != EC_VA_END;
s = va_arg(ap, const char *)) {
for (s = va_arg(ap, const char *);
s != EC_VA_END;
s = va_arg(ap, const char *)) {
- struct ec_comp_iter *iter;
const struct ec_comp_item *item;
if (s == NULL) {
const struct ec_comp_item *item;
if (s == NULL) {
@@
-140,8
+139,7
@@
int ec_test_check_complete(struct ec_node *tk, enum ec_comp_type type, ...)
count++;
/* only check matching completions */
count++;
/* only check matching completions */
- iter = ec_comp_iter(c, type);
- while ((item = ec_comp_iter_next(iter)) != NULL) {
+ EC_COMP_FOREACH(item, c, type) {
const char *str = ec_comp_item_get_str(item);
if (str != NULL && strcmp(str, s) == 0)
break;
const char *str = ec_comp_item_get_str(item);
if (str != NULL && strcmp(str, s) == 0)
break;
@@
-152,7
+150,6
@@
int ec_test_check_complete(struct ec_node *tk, enum ec_comp_type type, ...)
"completion <%s> not in list\n", s);
ret = -1;
}
"completion <%s> not in list\n", s);
ret = -1;
}
- ec_comp_iter_free(iter);
}
/* check if we have more completions (or less) than expected */
}
/* check if we have more completions (or less) than expected */