mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-25 09:15:43 +08:00
ci(mem): make sys/def heap tests work correctly with the new lv_conf.h settings
This commit is contained in:
@@ -20,18 +20,33 @@ extern "C" {
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
#ifdef LVGL_CI_USING_SYS_HEAP
|
||||
#define LV_STDLIB_INCLUDE <stdlib.h>
|
||||
#define LV_MALLOC malloc
|
||||
#define LV_REALLOC realloc
|
||||
#define LV_FREE free
|
||||
#define LV_MEMSET memset
|
||||
#define LV_MEMCPY memcpy
|
||||
#endif
|
||||
|
||||
#ifdef LVGL_CI_USING_DEF_HEAP
|
||||
#define LV_MALLOC lv_malloc_builtin
|
||||
#define LV_REALLOC lv_realloc_builtin
|
||||
#define LV_FREE lv_free_builtin
|
||||
#define LV_MEMSET lv_memset_builtin
|
||||
#define LV_MEMCPY lv_memcpy_builtin
|
||||
#endif
|
||||
|
||||
|
||||
void lv_test_assert_fail(void);
|
||||
#define LV_ASSERT_HANDLER lv_test_assert_fail();
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
uint32_t custom_tick_get(void);
|
||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR custom_tick_get()
|
||||
|
||||
typedef void * lv_user_data_t;
|
||||
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
@@ -16,7 +16,7 @@ void tearDown(void)
|
||||
/* #3324 */
|
||||
void test_mem_buf_realloc(void)
|
||||
{
|
||||
#if LV_USE_BUILTIN_MALLOC
|
||||
#ifdef LVGL_CI_USING_DEF_HEAP
|
||||
void * buf1 = lv_malloc(20);
|
||||
void * buf2 = lv_realloc(buf1, LV_MEM_SIZE + 16384);
|
||||
TEST_ASSERT_NULL(buf2);
|
||||
|
||||
Reference in New Issue
Block a user