diff options
author | Eric Engestrom <[email protected]> | 2019-02-14 10:30:47 +0000 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2019-02-14 12:52:34 +0000 |
commit | c2b4b46fa9394b15339686d569dff1d39c46d759 (patch) | |
tree | 042be074803dd977cb0f3d03983d7efac84e7717 /src/util/tests | |
parent | f7c56475d25138234ab0bb28a10df9000de594f9 (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.cpp | 2 | ||||
-rw-r--r-- | src/util/tests/hash_table/clear.c | 2 | ||||
-rw-r--r-- | src/util/tests/hash_table/collision.c | 2 | ||||
-rw-r--r-- | src/util/tests/hash_table/delete_and_lookup.c | 2 | ||||
-rw-r--r-- | src/util/tests/hash_table/delete_management.c | 2 | ||||
-rw-r--r-- | src/util/tests/hash_table/destroy_callback.c | 2 | ||||
-rw-r--r-- | src/util/tests/hash_table/insert_and_lookup.c | 2 | ||||
-rw-r--r-- | src/util/tests/hash_table/insert_many.c | 2 | ||||
-rw-r--r-- | src/util/tests/hash_table/random_entry.c | 2 | ||||
-rw-r--r-- | src/util/tests/hash_table/remove_key.c | 2 | ||||
-rw-r--r-- | src/util/tests/hash_table/remove_null.c | 2 | ||||
-rw-r--r-- | src/util/tests/hash_table/replacement.c | 2 |
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> |