summaryrefslogtreecommitdiffstats
path: root/src/util/tests
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2019-02-14 10:30:47 +0000
committerEric Engestrom <[email protected]>2019-02-14 12:52:34 +0000
commitc2b4b46fa9394b15339686d569dff1d39c46d759 (patch)
tree042be074803dd977cb0f3d03983d7efac84e7717 /src/util/tests
parentf7c56475d25138234ab0bb28a10df9000de594f9 (diff)
util/tests: compile to something sensible in release builds
assert()-based tests make no sense without asserts, so make sure asserts are compiled in, even if the rest of the code has asserts turned off. Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/util/tests')
-rw-r--r--src/util/tests/fast_idiv_by_const/fast_idiv_by_const_test.cpp2
-rw-r--r--src/util/tests/hash_table/clear.c2
-rw-r--r--src/util/tests/hash_table/collision.c2
-rw-r--r--src/util/tests/hash_table/delete_and_lookup.c2
-rw-r--r--src/util/tests/hash_table/delete_management.c2
-rw-r--r--src/util/tests/hash_table/destroy_callback.c2
-rw-r--r--src/util/tests/hash_table/insert_and_lookup.c2
-rw-r--r--src/util/tests/hash_table/insert_many.c2
-rw-r--r--src/util/tests/hash_table/random_entry.c2
-rw-r--r--src/util/tests/hash_table/remove_key.c2
-rw-r--r--src/util/tests/hash_table/remove_null.c2
-rw-r--r--src/util/tests/hash_table/replacement.c2
12 files changed, 24 insertions, 0 deletions
diff --git a/src/util/tests/fast_idiv_by_const/fast_idiv_by_const_test.cpp b/src/util/tests/fast_idiv_by_const/fast_idiv_by_const_test.cpp
index 3983a39edda..b0b3669e73b 100644
--- a/src/util/tests/fast_idiv_by_const/fast_idiv_by_const_test.cpp
+++ b/src/util/tests/fast_idiv_by_const/fast_idiv_by_const_test.cpp
@@ -21,6 +21,8 @@
* IN THE SOFTWARE.
*/
+#undef NDEBUG
+
#include <gtest/gtest.h>
#include "util/bigmath.h"
#include "util/fast_idiv_by_const.h"
diff --git a/src/util/tests/hash_table/clear.c b/src/util/tests/hash_table/clear.c
index 3d6bf80c0cf..101fe3717fc 100644
--- a/src/util/tests/hash_table/clear.c
+++ b/src/util/tests/hash_table/clear.c
@@ -21,6 +21,8 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#undef NDEBUG
+
#include "hash_table.h"
static void *make_key(uint32_t i)
diff --git a/src/util/tests/hash_table/collision.c b/src/util/tests/hash_table/collision.c
index ba8913281fb..c7f8569c265 100644
--- a/src/util/tests/hash_table/collision.c
+++ b/src/util/tests/hash_table/collision.c
@@ -24,6 +24,8 @@
* Eric Anholt <[email protected]>
*/
+#undef NDEBUG
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/util/tests/hash_table/delete_and_lookup.c b/src/util/tests/hash_table/delete_and_lookup.c
index 4f70509d03a..6248dfd5b02 100644
--- a/src/util/tests/hash_table/delete_and_lookup.c
+++ b/src/util/tests/hash_table/delete_and_lookup.c
@@ -24,6 +24,8 @@
* Eric Anholt <[email protected]>
*/
+#undef NDEBUG
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/util/tests/hash_table/delete_management.c b/src/util/tests/hash_table/delete_management.c
index 127d81b3ca9..f6e2fa8416e 100644
--- a/src/util/tests/hash_table/delete_management.c
+++ b/src/util/tests/hash_table/delete_management.c
@@ -24,6 +24,8 @@
* Eric Anholt <[email protected]>
*/
+#undef NDEBUG
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/util/tests/hash_table/destroy_callback.c b/src/util/tests/hash_table/destroy_callback.c
index 1c18ca3e392..3a050ff2ae2 100644
--- a/src/util/tests/hash_table/destroy_callback.c
+++ b/src/util/tests/hash_table/destroy_callback.c
@@ -24,6 +24,8 @@
* Eric Anholt <[email protected]>
*/
+#undef NDEBUG
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/util/tests/hash_table/insert_and_lookup.c b/src/util/tests/hash_table/insert_and_lookup.c
index 98e719ff520..1fd7353689f 100644
--- a/src/util/tests/hash_table/insert_and_lookup.c
+++ b/src/util/tests/hash_table/insert_and_lookup.c
@@ -24,6 +24,8 @@
* Eric Anholt <[email protected]>
*/
+#undef NDEBUG
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/util/tests/hash_table/insert_many.c b/src/util/tests/hash_table/insert_many.c
index b07e40842bf..c033843137f 100644
--- a/src/util/tests/hash_table/insert_many.c
+++ b/src/util/tests/hash_table/insert_many.c
@@ -24,6 +24,8 @@
* Eric Anholt <[email protected]>
*/
+#undef NDEBUG
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/util/tests/hash_table/random_entry.c b/src/util/tests/hash_table/random_entry.c
index d1bc44aeb30..a046eda3070 100644
--- a/src/util/tests/hash_table/random_entry.c
+++ b/src/util/tests/hash_table/random_entry.c
@@ -24,6 +24,8 @@
* Eric Anholt <[email protected]>
*/
+#undef NDEBUG
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/util/tests/hash_table/remove_key.c b/src/util/tests/hash_table/remove_key.c
index 906de67998b..6df6d7d0366 100644
--- a/src/util/tests/hash_table/remove_key.c
+++ b/src/util/tests/hash_table/remove_key.c
@@ -21,6 +21,8 @@
* IN THE SOFTWARE.
*/
+#undef NDEBUG
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/util/tests/hash_table/remove_null.c b/src/util/tests/hash_table/remove_null.c
index 7042f5e9349..f0f5274535e 100644
--- a/src/util/tests/hash_table/remove_null.c
+++ b/src/util/tests/hash_table/remove_null.c
@@ -24,6 +24,8 @@
* Eric Anholt <[email protected]>
*/
+#undef NDEBUG
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/util/tests/hash_table/replacement.c b/src/util/tests/hash_table/replacement.c
index 58c22aeb812..e74e63453c4 100644
--- a/src/util/tests/hash_table/replacement.c
+++ b/src/util/tests/hash_table/replacement.c
@@ -24,6 +24,8 @@
* Eric Anholt <[email protected]>
*/
+#undef NDEBUG
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>