diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_rdxtree.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/test/test_rdxtree.c b/test/test_rdxtree.c index b971628..f5f84a0 100644 --- a/test/test_rdxtree.c +++ b/test/test_rdxtree.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Richard Braun. + * Copyright (c) 2011-2015 Richard Braun. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -245,6 +245,29 @@ test_5(void) } static void +test_5_1(void) +{ + struct rdxtree tree; + struct obj *obj; + int error; + + TITLE("insert 0, 256 and 4096"); + + rdxtree_init(&tree); + obj = obj_create(0); + error = rdxtree_insert(&tree, obj->id, obj); + assert(!error); + obj = obj_create(256); + error = rdxtree_insert(&tree, obj->id, obj); + assert(!error); + obj = obj_create(4096); + error = rdxtree_insert(&tree, obj->id, obj); + assert(!error); + print_tree(&tree); + destroy_tree(&tree); +} + +static void test_6(void) { struct rdxtree tree; @@ -970,6 +993,7 @@ main(int argc, char *argv[]) test_3(); test_4(); test_5(); + test_5_1(); test_6(); test_7(); test_8(); |