X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Ftest-hash.c;h=081e72383c2089c73c1c680b7d6ab45ab2d4b063;hb=eadd16449c6e5292603cf009d29ab0e249979717;hp=0b7b87a20fecb8acb8bf9c7a1cf3eb6a78862ed8;hpb=01fed651097a90ef9365ce6c2f16da2970a5444e;p=sliver-openvswitch.git diff --git a/tests/test-hash.c b/tests/test-hash.c index 0b7b87a20..081e72383 100644 --- a/tests/test-hash.c +++ b/tests/test-hash.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012 Nicira, Inc. + * Copyright (c) 2009, 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. @@ -21,6 +21,7 @@ #include #include "hash.h" #include "jhash.h" +#include "ovstest.h" #undef NDEBUG #include @@ -111,8 +112,8 @@ check_3word_hash(uint32_t (*hash)(const uint32_t[], size_t, uint32_t), } } -int -main(void) +static void +test_hash_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) { /* Check that all hashes computed with hash_words with one 1-bit (or no * 1-bits) set within a single 32-bit word have different values in all @@ -167,6 +168,6 @@ main(void) * function. */ check_word_hash(hash_int_cb, "hash_int", 12); - - return 0; } + +OVSTEST_REGISTER("test-hash", test_hash_main);