X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Ftest-heap.c;h=3a0afa5fad00670613e671a789776ddeb998e6bb;hb=003ce655b7116d18c86a74c50391e54990346931;hp=dd5aaa956d669bdc6f607996c4a62e2e787714a7;hpb=e0edde6fee279cdbbf3c179f5f50adaf0c7c7f1e;p=sliver-openvswitch.git diff --git a/tests/test-heap.c b/tests/test-heap.c index dd5aaa956..3a0afa5fa 100644 --- a/tests/test-heap.c +++ b/tests/test-heap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Nicira, Inc. + * Copyright (c) 2012, 2014 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ #include "command-line.h" #include "random.h" #include "util.h" +#include "ovstest.h" #undef NDEBUG #include @@ -221,7 +222,7 @@ test_insert_delete__(struct element *elements, goto found; } } - NOT_REACHED(); + OVS_NOT_REACHED(); found: heap_remove(&heap, &element->heap_node); @@ -260,7 +261,7 @@ test_insert_delete_raw__(struct element *elements, goto found; } } - NOT_REACHED(); + OVS_NOT_REACHED(); found: heap_raw_remove(&heap, &element->heap_node); @@ -473,14 +474,15 @@ static const struct command commands[] = { test_heap_insert_delete_same_order_with_dups, }, { "raw-insert", 0, 0, test_heap_raw_insert, }, { "raw-delete", 0, 0, test_heap_raw_delete, }, + { NULL, 0, 0, NULL, }, }; -int -main(int argc, char *argv[]) +static void +test_heap_main(int argc, char *argv[]) { set_program_name(argv[0]); run_command(argc - 1, argv + 1, commands); - - return 0; } + +OVSTEST_REGISTER("test-heap", test_heap_main);