diff options
author | Chris Hall <chris.hall@highwayman.com> | 2011-02-13 23:11:45 +0000 |
---|---|---|
committer | Chris Hall <chris.hall@highwayman.com> | 2011-02-13 23:11:45 +0000 |
commit | 5cae7eea451f2b7d65b5892e2c1dafc70f8b836e (patch) | |
tree | 0fbd9679e9ae28e7d061b5bdda08756077415ecb /tests | |
parent | 64be6d766a65dc0749d17f5023d714678e9c96a6 (diff) | |
download | quagga-5cae7eea451f2b7d65b5892e2c1dafc70f8b836e.tar.bz2 quagga-5cae7eea451f2b7d65b5892e2c1dafc70f8b836e.tar.xz |
Second tranche of updates for pipework branch.
modified: bgpd/bgp_connection.c
modified: bgpd/bgp_debug.c
modified: bgpd/bgp_engine.h
modified: bgpd/bgp_main.c
modified: bgpd/bgp_packet.c
modified: bgpd/bgp_peer.c
modified: bgpd/bgp_route.c
modified: bgpd/bgp_routemap.c
modified: bgpd/bgp_session.c
modified: bgpd/bgp_vty.c
modified: bgpd/bgpd.c
modified: bgpd/bgpd.h
modified: configure.ac
modified: isisd/dict.h
modified: isisd/isis_misc.c
modified: isisd/isis_routemap.c
modified: isisd/isis_spf.c
modified: lib/Makefile.am
modified: lib/command.c
modified: lib/command.h
modified: lib/command_execute.h
modified: lib/command_parse.c
modified: lib/command_parse.h
modified: lib/command_queue.c
modified: lib/command_queue.h
modified: lib/elstring.h
modified: lib/heap.c
modified: lib/if.c
modified: lib/if.h
modified: lib/keychain.c
modified: lib/keystroke.c
modified: lib/keystroke.h
modified: lib/list_util.c
modified: lib/list_util.h
modified: lib/log.c
modified: lib/log.h
modified: lib/memory.c
modified: lib/memory.h
modified: lib/memtypes.c
modified: lib/misc.h
modified: lib/mqueue.c
modified: lib/mqueue.h
deleted: lib/node_type.h
modified: lib/pthread_safe.c
modified: lib/qfstring.c
modified: lib/qiovec.c
modified: lib/qiovec.h
modified: lib/qpath.c
modified: lib/qpnexus.c
modified: lib/qpnexus.h
modified: lib/qpselect.c
modified: lib/qpthreads.h
modified: lib/qstring.c
modified: lib/qstring.h
modified: lib/qtime.c
modified: lib/qtime.h
modified: lib/qtimers.c
modified: lib/qtimers.h
modified: lib/routemap.c
modified: lib/symtab.h
modified: lib/thread.h
deleted: lib/uty.h
modified: lib/vector.c
modified: lib/vector.h
modified: lib/version.h.in
modified: lib/vio_fifo.c
modified: lib/vio_fifo.h
modified: lib/vio_lines.c
modified: lib/vio_lines.h
modified: lib/vty.c
modified: lib/vty.h
modified: lib/vty_cli.c
modified: lib/vty_cli.h
modified: lib/vty_io.c
modified: lib/vty_io.h
modified: lib/vty_io_basic.c
modified: lib/vty_io_basic.h
modified: lib/vty_io_file.c
modified: lib/vty_io_file.h
modified: lib/vty_io_shell.c
modified: lib/vty_io_term.c
modified: lib/vty_io_term.h
modified: lib/vty_local.h
modified: lib/vty_pipe.c
modified: lib/workqueue.h
modified: lib/zebra.h
modified: ospf6d/ospf6_lsa.c
modified: ripngd/ripngd.c
modified: tests/test-list_util.c
modified: tests/test-vector.c
modified: vtysh/vtysh.c
modified: vtysh/vtysh_config.c
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-list_util.c | 25 | ||||
-rw-r--r-- | tests/test-vector.c | 4 |
2 files changed, 15 insertions, 14 deletions
diff --git a/tests/test-list_util.c b/tests/test-list_util.c index a3c6ad59..c4e88502 100644 --- a/tests/test-list_util.c +++ b/tests/test-list_util.c @@ -1,4 +1,5 @@ #include <zebra.h> +#include "misc.h" #include <list_util.h> #include <string.h> @@ -253,12 +254,12 @@ test_ssl(void) this = base ; first = base->next ; ret = ssl_del(base, this, next) ; - test_assert(ret == 0, "ssl_del did not return 0") ; + test_assert(ret == true, "ssl_del did not return true") ; test_assert(first == base, "ssl_del of first item failed") ; this = other->base ; ret = ssl_del(other->base, this, other_next) ; - test_assert(ret == 0, "ssl_del did not return 0") ; + test_assert(ret == true, "ssl_del did not return true") ; test_assert(first == other->base, "ssl_del of first item failed") ; printf("\n") ; @@ -271,9 +272,9 @@ test_ssl(void) */ printf(" Deleting arbitrary items") ; ret = ssl_del(base, del, next) ; - test_assert(ret == 0, "ssl_del did not return 0") ; + test_assert(ret == true, "ssl_del did not return true") ; ret = ssl_del(ssl_parent.base, other_del, other_next) ; - test_assert(ret == 0, "ssl_del did not return 0") ; + test_assert(ret == true, "ssl_del did not return true") ; printf("\n") ; /* Deletion of items from arbitrary place in list @@ -282,9 +283,9 @@ test_ssl(void) */ printf(" Deleting non-existant items") ; ret = ssl_del(base, &dummy, next) ; - test_assert(ret == -1, "ssl_del did not return -1") ; + test_assert(ret == false, "ssl_del did not return false") ; ret = ssl_del(other->base, &dummy, other_next) ; - test_assert(ret == -1, "ssl_del did not return -1") ; + test_assert(ret == false, "ssl_del did not return false") ; printf("\n") ; /* Deletion of NULL items @@ -296,10 +297,10 @@ test_ssl(void) this = NULL ; ret = ssl_del(base, this, next) ; - test_assert(ret == 0, "ssl_del did not return 0") ; + test_assert(ret == false, "ssl_del did not return false") ; ret = ssl_del(ssl_parent.base, this, other_next) ; - test_assert(ret == 0, "ssl_del did not return 0") ; + test_assert(ret == false, "ssl_del did not return false") ; printf("\n") ; @@ -567,21 +568,21 @@ test_ssl(void) test_assert(other->base == NULL, "ssl_del of first and only item failed") ; ret = ssl_del(base, del, next) ; - test_assert(ret == -1, "ssl_del did not return -1") ; + test_assert(ret == false, "ssl_del did not return false") ; test_assert(base == NULL, "ssl_del on empty list") ; ret = ssl_del(other->base, other_del, other_next) ; - test_assert(ret == -1, "ssl_del did not return -1") ; + test_assert(ret == false, "ssl_del did not return false") ; test_assert(other->base == NULL, "ssl_del on empty list") ; this = NULL ; ret = ssl_del(base, this, next) ; - test_assert(ret == 0, "ssl_del did not return 0") ; + test_assert(ret == false, "ssl_del did not return false") ; test_assert(base == NULL, "ssl_del on empty list") ; ret = ssl_del(other->base, this, other_next) ; - test_assert(ret == 0, "ssl_del did not return 0") ; + test_assert(ret == false, "ssl_del did not return false") ; test_assert(other->base == NULL, "ssl_del on empty list") ; printf("\n") ; diff --git a/tests/test-vector.c b/tests/test-vector.c index a73e5637..e95e3c58 100644 --- a/tests/test-vector.c +++ b/tests/test-vector.c @@ -25,7 +25,7 @@ void test_vector_insert_item(void); void test_vector_insert_item_here(void); void test_vector_delete_item(void); void do_test_insert(const int rider); -int sort_cmp(const void** a, const void** b); +int sort_cmp(void const* const* a, void const* const* b); void test_vector_sort(void); void test_vector_bsearch(void); void test_vector_move_item_here(void); @@ -550,7 +550,7 @@ test_vector_sort(void) } int -sort_cmp(const void** a, const void** b) +sort_cmp(void const* const* a, void const* const* b) { return strcmp(*a, *b); } |