diff --git a/include/node.h b/include/node.h index 1535fd6..73a374a 100644 --- a/include/node.h +++ b/include/node.h @@ -43,6 +43,8 @@ rnode * rnode_insert_routel(rnode *tree, char *route, int route_len); void rnode_dump(rnode * n, int level); +rnode * rnode_lookup(rnode * tree, char * path, int path_len); + redge * redge_create(char * pattern, int pattern_len, rnode * child); void redge_free(redge * edge); diff --git a/tests/test_tree.c b/tests/test_tree.c index eb89713..fbb2e28 100644 --- a/tests/test_tree.c +++ b/tests/test_tree.c @@ -66,9 +66,9 @@ START_TEST (test_rnode_insert_tokens) rnode_dump(n, 0); - fail_if( rnode_lookup(n, "/a/jj/kk", strlen("/a/jj/kk") ) == NULL ); - fail_if( rnode_lookup(n, "/a/jj", strlen("/a/jj") ) != NULL ); - fail_if( rnode_lookup(n, "/a/jj/kk/ll", strlen("/a/jj/kk/ll") ) != NULL ); + fail_if( rnode_lookup(n , "/a/jj/kk" , strlen("/a/jj/kk") ) == NULL ); + fail_if( rnode_lookup(n , "/a/jj" , strlen("/a/jj") ) != NULL ); + fail_if( rnode_lookup(n , "/a/jj/kk/ll" , strlen("/a/jj/kk/ll") ) != NULL ); fail_if( rnode_lookup(n, "/xxxx", strlen("xxxx") ) != NULL );