]> git.ozlabs.org Git - ccan/blobdiff - ccan/strmap/test/run-order.c
strmap: Convert to using TCON_WRAP() instead of plain TCON()
[ccan] / ccan / strmap / test / run-order.c
index 417a7406b537a173d3b5b99701c60505e2bcc94b..b541666d81209820f62d37418476ee51a1f22a88 100644 (file)
@@ -11,7 +11,7 @@ static bool in_order(const char *member, char *value, unsigned int *count)
        ok1(i == atoi(value));
        ok1(*count == i);
        (*count)++;
-       return false;
+       return true;
 }
 
 static bool in_order_by_2(const char *member, char *value, unsigned int *count)
@@ -20,7 +20,7 @@ static bool in_order_by_2(const char *member, char *value, unsigned int *count)
        ok1(i == atoi(value));
        ok1(*count == i);
        (*count) += 2;
-       return false;
+       return true;
 }
 
 static bool dump(const char *member, char *value, bool *ok)
@@ -28,14 +28,12 @@ static bool dump(const char *member, char *value, bool *ok)
        diag("%s=>%s", member, value);
        if (value != member + 1)
                *ok = false;
-       return false;
+       return true;
 }
 
 int main(void)
 {
-       struct strmap_charp {
-               STRMAP_MEMBERS(char *);
-       } map;
+       STRMAP(char *) map;
        unsigned int i;
        char *str[NUM];
        bool dump_ok;