test: added test cases.
This commit is contained in:
parent
0d70b8f5de
commit
81f77ffe5a
3 changed files with 5 additions and 9 deletions
|
@ -23,6 +23,5 @@ add_r3_test(check_http_scheme check_http_scheme.c)
|
|||
add_r3_test(check_remote_addr check_remote_addr.c)
|
||||
add_r3_test(check_routes2 check_routes2.c)
|
||||
|
||||
|
||||
add_executable(bench bench.c)
|
||||
target_link_libraries(bench r3)
|
||||
|
|
|
@ -24,12 +24,10 @@ START_TEST (greedy_pattern)
|
|||
ck_assert(matched_route != NULL);
|
||||
ck_assert(matched_route->data == &uri0);
|
||||
|
||||
// fixme: should match
|
||||
|
||||
// entry = match_entry_create("/foo");
|
||||
// matched_route = r3_tree_match_route(n, entry);
|
||||
// ck_assert(matched_route != NULL);
|
||||
// ck_assert(matched_route->data == &uri0);
|
||||
entry = match_entry_create("/foo");
|
||||
matched_route = r3_tree_match_route(n, entry);
|
||||
ck_assert(matched_route != NULL);
|
||||
ck_assert(matched_route->data == &uri0);
|
||||
|
||||
entry = match_entry_create("/foo/");
|
||||
matched_route = r3_tree_match_route(n, entry);
|
||||
|
@ -62,4 +60,3 @@ int main (int argc, char *argv[]) {
|
|||
srunner_free(runner);
|
||||
return number_failed;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue