util/tests: compile to something sensible in release builds
authorEric Engestrom <eric.engestrom@intel.com>
Thu, 14 Feb 2019 10:30:47 +0000 (10:30 +0000)
committerEric Engestrom <eric@engestrom.ch>
Thu, 14 Feb 2019 12:52:34 +0000 (12:52 +0000)
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 <eric.engestrom@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
12 files changed:
src/util/tests/fast_idiv_by_const/fast_idiv_by_const_test.cpp
src/util/tests/hash_table/clear.c
src/util/tests/hash_table/collision.c
src/util/tests/hash_table/delete_and_lookup.c
src/util/tests/hash_table/delete_management.c
src/util/tests/hash_table/destroy_callback.c
src/util/tests/hash_table/insert_and_lookup.c
src/util/tests/hash_table/insert_many.c
src/util/tests/hash_table/random_entry.c
src/util/tests/hash_table/remove_key.c
src/util/tests/hash_table/remove_null.c
src/util/tests/hash_table/replacement.c

index 3983a39edda53aa5b789097c916bbe73019d00cf..b0b3669e73b0249e2453a16237c0044d0df55d70 100644 (file)
@@ -21,6 +21,8 @@
  * IN THE SOFTWARE.
  */
 
+#undef NDEBUG
+
 #include <gtest/gtest.h>
 #include "util/bigmath.h"
 #include "util/fast_idiv_by_const.h"
index 3d6bf80c0cf8b7747e982f474d814ae9613a4275..101fe3717fc72b51b9e12903ab78be40c83330f7 100644 (file)
@@ -21,6 +21,8 @@
  * USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#undef NDEBUG
+
 #include "hash_table.h"
 
 static void *make_key(uint32_t i)
index ba8913281fbd5aff63eafb0cb9defc7203523c94..c7f8569c265f17ebc9c226177bb478bf9698646b 100644 (file)
@@ -24,6 +24,8 @@
  *    Eric Anholt <eric@anholt.net>
  */
 
+#undef NDEBUG
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
index 4f70509d03ad2a09ba09409adab27d54943f6e5e..6248dfd5b02c75c113e53ab6722795f7112fb56b 100644 (file)
@@ -24,6 +24,8 @@
  *    Eric Anholt <eric@anholt.net>
  */
 
+#undef NDEBUG
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
index 127d81b3ca9329ffde51e47936bfc5de8964c63c..f6e2fa8416e115d8b0c77426301927ce21e05fa2 100644 (file)
@@ -24,6 +24,8 @@
  *    Eric Anholt <eric@anholt.net>
  */
 
+#undef NDEBUG
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
index 1c18ca3e392fc0e1e57af32982fdc37a38427c1f..3a050ff2ae297e1ca7be49763feb506193589bb1 100644 (file)
@@ -24,6 +24,8 @@
  *    Eric Anholt <eric@anholt.net>
  */
 
+#undef NDEBUG
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
index 98e719ff520fa33751b168b8cedaa92a5f64342d..1fd7353689fcb6f64e38a82ce4a22fad3024be14 100644 (file)
@@ -24,6 +24,8 @@
  *    Eric Anholt <eric@anholt.net>
  */
 
+#undef NDEBUG
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
index b07e40842bfacd4c8cc29048bad6497b7644143d..c033843137faabaa685e0e6aa018cc8a2e0b1ce6 100644 (file)
@@ -24,6 +24,8 @@
  *    Eric Anholt <eric@anholt.net>
  */
 
+#undef NDEBUG
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
index d1bc44aeb306feba7307f06629f5d8906344a314..a046eda3070ad3984602105dff7dba1716b42ab8 100644 (file)
@@ -24,6 +24,8 @@
  *    Eric Anholt <eric@anholt.net>
  */
 
+#undef NDEBUG
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
index 906de67998bf73b9d6bcbaace1ebf581c4736152..6df6d7d036667fdc7d1ce7f60847257d047aa1aa 100644 (file)
@@ -21,6 +21,8 @@
  * IN THE SOFTWARE.
  */
 
+#undef NDEBUG
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
index 7042f5e93492d9058d0de396fb5fc51abb599862..f0f5274535e009da3342abb4895b7415c0339610 100644 (file)
@@ -24,6 +24,8 @@
  *    Eric Anholt <eric@anholt.net>
  */
 
+#undef NDEBUG
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
index 58c22aeb812b1945bff594d2fa42522f890b6fc2..e74e63453c4f76795aa7dbf6ac679b9278711dba 100644 (file)
@@ -24,6 +24,8 @@
  *    Eric Anholt <eric@anholt.net>
  */
 
+#undef NDEBUG
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>