X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fredblack-test.c;h=80a7a000ce8711603b11fce25877ca03fb46b4bb;hb=580fd9c443c2a4faba5a703d49f366de5d3968c9;hp=967120a781ef92f42b9af223d1cd86a36046262f;hpb=d6946801d70e8755e3dd4b2d95ffd8ca84cdb8a1;p=libucw.git diff --git a/lib/redblack-test.c b/lib/redblack-test.c index 967120a7..80a7a000 100644 --- a/lib/redblack-test.c +++ b/lib/redblack-test.c @@ -5,7 +5,7 @@ */ #include "lib/lib.h" -#include "lib/conf.h" +#include "lib/getopt.h" #include "lib/fastbuf.h" #include #include @@ -127,7 +127,7 @@ main(int argc, char **argv) struct my_tree t; struct my2_tree t2; int i; - cfdeffile = NULL; + cf_def_file = NULL; log_init(argv[0]); while ((opt = cf_getopt(argc, argv, options, CF_NO_LONG_OPTS, NULL)) >= 0) switch (opt) @@ -191,13 +191,6 @@ main(int argc, char **argv) my_dump(NULL, &t); } my_dump(dump_fb, &t); - for (i=0; i<997; i++) - { - int res UNUSED = my_delete(&t, i*111 % 997); - ASSERT(res); - my_dump(NULL, &t); - } - my_dump(dump_fb, &t); i = 0; TREE_FOR_ALL(my, &t, n) { @@ -205,6 +198,14 @@ main(int argc, char **argv) i++; } TREE_END_FOR; + ASSERT(i == 997); + for (i=0; i<997; i++) + { + int res UNUSED = my_delete(&t, i*111 % 997); + ASSERT(res); + my_dump(NULL, &t); + } + my_dump(dump_fb, &t); my_cleanup(&t); if (verbose > 0) bputs(fb, "Complete tree passed\n");