summaryrefslogtreecommitdiff
path: root/tests/test-hash.c
diff options
context:
space:
mode:
authorJarno Rajahalme <jrajahalme@nicira.com>2014-10-29 11:34:40 -0700
committerJarno Rajahalme <jrajahalme@nicira.com>2014-10-30 09:14:46 -0700
commit3f636c7e22945652e0e2553894598fa24a5d5f6f (patch)
treeaa963c9fbbae71a6801c0c216c56916ba23c16fb /tests/test-hash.c
parent5445f508df83f260b2953cc6cd3021c1e22d9aec (diff)
downloadopenvswitch-3f636c7e22945652e0e2553894598fa24a5d5f6f.tar.gz
ovs_assert, tests: Support NDEBUG.
./configure accepts --enable-ndebug option. Make ovs_assert() honor it, and make sure all test programs disable it. The order of include files in test programs is also made uniform: 1. #include <config.h> 2. #undef NDEBUG 3. Include file of the test subject (to make sure it itself has sufficient include directives). 4. System includes in alphapetical order. 5. OVS includes in aplhapetical order. Suggested-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'tests/test-hash.c')
-rw-r--r--tests/test-hash.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test-hash.c b/tests/test-hash.c
index 92f0e2f79..35b23e936 100644
--- a/tests/test-hash.c
+++ b/tests/test-hash.c
@@ -15,17 +15,16 @@
*/
#include <config.h>
+#undef NDEBUG
+#include "hash.h"
+#include <assert.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "hash.h"
#include "jhash.h"
#include "ovstest.h"
-#undef NDEBUG
-#include <assert.h>
-
static void
set_bit(uint32_t array[3], int bit)
{