utils: Introduce OSMO_ASSERT in the utils and use it in the unit tests
The tests should unconditionally assert, regardless of debug settings.
This uses the OSMO_ prefix as it's in the global namespace.
diff --git a/tests/loggingrb/loggingrb_test.c b/tests/loggingrb/loggingrb_test.c
index 1ab5212..9957b53 100644
--- a/tests/loggingrb/loggingrb_test.c
+++ b/tests/loggingrb/loggingrb_test.c
@@ -18,7 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-#include <assert.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/utils.h>
@@ -77,7 +76,7 @@
DEBUGP(DMM, "You should not see this\n");
fprintf(stderr, ringbuffer_get_nth(ringbuf_target->tgt_rbvty.rb, 0));
fprintf(stderr, ringbuffer_get_nth(ringbuf_target->tgt_rbvty.rb, 1));
- assert(!ringbuffer_get_nth(ringbuf_target->tgt_rbvty.rb, 2));
+ OSMO_ASSERT(!ringbuffer_get_nth(ringbuf_target->tgt_rbvty.rb, 2));
return 0;
}