diff options
Diffstat (limited to 'tests/gen_inode_table.c')
-rw-r--r-- | tests/gen_inode_table.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/tests/gen_inode_table.c b/tests/gen_inode_table.c index 7a93efc..190f393 100644 --- a/tests/gen_inode_table.c +++ b/tests/gen_inode_table.c @@ -12,15 +12,14 @@ #include <assert.h> #include <string.h> -static tree_node_t *gen_node(fstree_t *fs, tree_node_t *parent, - const char *name) +static tree_node_t *gen_node(tree_node_t *parent, const char *name) { struct stat sb; memset(&sb, 0, sizeof(sb)); sb.st_mode = S_IFDIR | 0755; - return fstree_mknode(fs, parent, name, strlen(name), NULL, &sb); + return fstree_mknode(parent, name, strlen(name), NULL, &sb); } static void check_children_before_root(tree_node_t *root) @@ -67,24 +66,24 @@ int main(void) // tree with 2 levels under root, fan out 3 assert(fstree_init(&fs, 0, NULL) == 0); - a = gen_node(&fs, fs.root, "a"); - b = gen_node(&fs, fs.root, "b"); - c = gen_node(&fs, fs.root, "c"); + a = gen_node(fs.root, "a"); + b = gen_node(fs.root, "b"); + c = gen_node(fs.root, "c"); assert(a != NULL); assert(b != NULL); assert(c != NULL); - assert(gen_node(&fs, a, "a_a") != NULL); - assert(gen_node(&fs, a, "a_b") != NULL); - assert(gen_node(&fs, a, "a_c") != NULL); + assert(gen_node(a, "a_a") != NULL); + assert(gen_node(a, "a_b") != NULL); + assert(gen_node(a, "a_c") != NULL); - assert(gen_node(&fs, b, "b_a") != NULL); - assert(gen_node(&fs, b, "b_b") != NULL); - assert(gen_node(&fs, b, "b_c") != NULL); + assert(gen_node(b, "b_a") != NULL); + assert(gen_node(b, "b_b") != NULL); + assert(gen_node(b, "b_c") != NULL); - assert(gen_node(&fs, c, "c_a") != NULL); - assert(gen_node(&fs, c, "c_b") != NULL); - assert(gen_node(&fs, c, "c_c") != NULL); + assert(gen_node(c, "c_a") != NULL); + assert(gen_node(c, "c_b") != NULL); + assert(gen_node(c, "c_c") != NULL); assert(fstree_gen_inode_table(&fs) == 0); |