From 87d323f240fd6da8d000357ac8d6baf649854b53 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 25 Sep 2023 10:54:02 +0200 Subject: [PATCH] chore: fix TEST_ASSERT_MEM_LEAK_LESS_THAN --- tests/unity/unity_support.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unity/unity_support.h b/tests/unity/unity_support.h index 8815254ed..cfd825f4d 100644 --- a/tests/unity/unity_support.h +++ b/tests/unity/unity_support.h @@ -38,7 +38,7 @@ bool lv_test_assert_image_eq(const char * fn_ref); # define TEST_ASSERT_EQUAL_COLOR32_MESSAGE(c1, c2, msg) TEST_ASSERT_TRUE(lv_color32_eq(c1, c2), msg) -# define TEST_ASSERT_MEM_LEAK_LESS_THAN(prev_usage, threshold) TEST_ASSERT_LESS_THAN(LV_ABS((int64_t)(prev_usage) - (int64_t)lv_test_get_free_mem()), threshold); +# define TEST_ASSERT_MEM_LEAK_LESS_THAN(prev_usage, threshold) TEST_ASSERT_LESS_THAN(threshold, LV_ABS((int64_t)(prev_usage) - (int64_t)lv_test_get_free_mem())); #ifdef __cplusplus } /*extern "C"*/