summaryrefslogtreecommitdiff
path: root/tests/gen_inode_table.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-25 17:49:01 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-25 17:49:01 +0200
commit2341da0e0654aa8e89e5f3630f8142346788e061 (patch)
treeeb21a5e7b854b7457700e0c72cc4a6f8e9577b74 /tests/gen_inode_table.c
parent3511b1fa7c6f71c579e161951e945904e552e1d9 (diff)
Fix API changes in unit tests
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/gen_inode_table.c')
-rw-r--r--tests/gen_inode_table.c29
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);