GRU tree example
#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
return root;
}
printf("Comparing %s with %s\n", (const char *) current, (const char *) data);
if (strcmp((const char *) current, (const char *) data) == 0) {
return true;
}
return false;
}
void print_path(
const void *nodedata,
void *data) {
printf("\t%s\n", (const char *) nodedata);
}
}
int main(
int argc,
char **argv) {
if (count != 11) {
fprintf(stderr, "Expected 11 nodes but got %d\n", count);
return EXIT_FAILURE;
}
if (children != 4) {
fprintf(stderr, "Expected 4 children nodes but got %d\n", children);
return EXIT_FAILURE;
}
printf("Printing childs of var\n");
printf("Done");
if (count != 6) {
fprintf(stderr, "Expected 7 nodes after removing var but got %d\n", count);
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}