]> git.ozlabs.org Git - ccan/blobdiff - ccan/tal/test/run-named.c
base64: fix for unsigned chars (e.g. ARM).
[ccan] / ccan / tal / test / run-named.c
index d2c9b9e1f7539cade4e447279426a3f9d7d833a4..d6275ac687c3f8d111658e40fa40c27312037f57 100644 (file)
@@ -7,10 +7,10 @@ int main(void)
        int *p;
        char name[] = "test name";
 
-       plan_tests(5);
+       plan_tests(6);
 
        p = tal(NULL, int);
-       ok1(tal_name(p) == NULL);
+       ok1(strcmp(tal_name(p), "int") == 0);
 
        tal_set_name(p, "some literal");
        ok1(strcmp(tal_name(p), "some literal") == 0);
@@ -25,5 +25,10 @@ int main(void)
 
        tal_free(p);
 
+       p = tal_arr(NULL, int, 2);
+       ok1(strcmp(tal_name(p), "int[]") == 0);
+       tal_free(p);
+
+       tal_cleanup();
        return exit_status();
 }