change add to full str
[protos/libecoli.git] / lib / ecoli_test.c
index 9b05575..291417d 100644 (file)
@@ -102,7 +102,7 @@ int ec_test_check_complete(struct ec_node *tk, ...)
 {
        struct ec_completed *c = NULL;
        struct ec_strvec *vec = NULL;
-       const char *s, *expected;
+       const char *s;
        int ret = 0;
        unsigned int count = 0;
        va_list ap;
@@ -147,7 +147,7 @@ int ec_test_check_complete(struct ec_node *tk, ...)
                /* only check matching completions */
                iter = ec_completed_iter(c, EC_MATCH);
                while ((item = ec_completed_iter_next(iter)) != NULL) {
-                       if (item->add != NULL && strcmp(item->add, s) == 0)
+                       if (item->str != NULL && strcmp(item->str, s) == 0)
                                break;
                }
 
@@ -166,17 +166,8 @@ int ec_test_check_complete(struct ec_node *tk, ...)
                        count, ec_completed_count(c, EC_MATCH));
                ec_completed_dump(stdout, c);
                ret = -1;
-       }
-
-       /* check the expected smallest start */
-       expected = va_arg(ap, const char *);
-       s = ec_completed_smallest_start(c);
-       if (strcmp(s, expected)) {
-               ret = -1;
-               ec_log(EC_LOG_ERR,
-                       "should complete with <%s> but completes with <%s>\n",
-                       expected, s);
-       }
+       } else
+               ec_completed_dump(stdout, c); //XXX
 
 out:
        ec_strvec_free(vec);