From 8af912b002b677d118380b4bea45a52d99f5abf0 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Tue, 25 Feb 2020 09:28:59 +0100 Subject: [PATCH] tests/lua_loader: fix NDEBUG compile problem --- tests/lua_loader/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/lua_loader/main.c b/tests/lua_loader/main.c index 2e283f2948..41f51e6264 100644 --- a/tests/lua_loader/main.c +++ b/tests/lua_loader/main.c @@ -26,11 +26,12 @@ #include #include -#include #include "lua_run.h" #include "lua_builtin.h" +#include "test_utils/expect.h" + static const uint8_t pure_module_1[] = "\n\ return {a='Quando uma lua'}\n\ "; @@ -81,7 +82,7 @@ int main(void) status = lua_riot_do_module("test", lua_mem, LUA_MEM_SIZE, LUAR_LOAD_BASE, NULL); - assert(status == LUAR_EXIT); + expect(status == LUAR_EXIT); while (fgets(linebuf, LINEBUF_SZ, stdin) != NULL) { int status; @@ -98,7 +99,7 @@ int main(void) status = lua_riot_do_buffer((unsigned char *)linebuf, linelen, lua_mem, LUA_MEM_SIZE, LUAR_LOAD_BASE | LUAR_LOAD_PACKAGE, NULL); - assert(status == LUAR_EXIT); + expect(status == LUAR_EXIT); } return 0;