From: Eric Engestrom Date: Thu, 14 Feb 2019 10:30:47 +0000 (+0000) Subject: util/tests: compile to something sensible in release builds X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c2b4b46fa9394b15339686d569dff1d39c46d759;p=mesa.git 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 Acked-by: Lionel Landwerlin --- 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 #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 */ +#undef NDEBUG + #include #include #include 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 */ +#undef NDEBUG + #include #include #include 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 */ +#undef NDEBUG + #include #include #include 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 */ +#undef NDEBUG + #include #include #include 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 */ +#undef NDEBUG + #include #include #include 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 */ +#undef NDEBUG + #include #include #include 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 */ +#undef NDEBUG + #include #include #include 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 #include #include 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 */ +#undef NDEBUG + #include #include #include 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 */ +#undef NDEBUG + #include #include #include