acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

unity_support.h (1958B)

      1 
      2 #ifndef LV_UNITY_SUPPORT_H
      3 #define LV_UNITY_SUPPORT_H
      4 
      5 #ifdef __cplusplus
      6 extern "C" {
      7 #endif
      8 
      9 #include <stdbool.h>
     10 #include "../../lvgl.h"
     11 
     12 bool lv_test_assert_img_eq(const char * fn_ref);
     13 
     14 
     15 #if LV_COLOR_DEPTH != 32
     16 #  define TEST_ASSERT_EQUAL_SCREENSHOT(path)                TEST_IGNORE_MESSAGE("Requires LV_COLOR_DEPTH 32");
     17 #  define TEST_ASSERT_EQUAL_SCREENSHOT_MESSAGE(path, msg)   TEST_PRINTF(msg); TEST_IGNORE_MESSAGE("Requires LV_COLOR_DEPTH 32");
     18 #else
     19 
     20 #  define TEST_ASSERT_EQUAL_SCREENSHOT(path)                if(LV_HOR_RES != 800 || LV_VER_RES != 480) {          \
     21                                                               TEST_IGNORE_MESSAGE("Requires 800x480 resolution"); \
     22                                                             } else {                                              \
     23                                                               TEST_ASSERT(lv_test_assert_img_eq(path));            \
     24                                                             }
     25 
     26 #  define TEST_ASSERT_EQUAL_SCREENSHOT_MESSAGE(path, msg)    if(LV_HOR_RES != 800 || LV_VER_RES != 480) {             \
     27                                                               TEST_PRINTF(msg);                                       \
     28                                                               TEST_IGNORE_MESSAGE("Requires 800x480 resolution");     \
     29                                                             } else {                                                  \
     30                                                               TEST_ASSERT_MESSAGE(lv_test_assert_img_eq(path), msg);  \
     31                                                             }
     32 #endif
     33 
     34 #  define TEST_ASSERT_EQUAL_COLOR(c1, c2)                   TEST_ASSERT_EQUAL_UINT32(c1.full, c2.full)
     35 #  define TEST_ASSERT_EQUAL_COLOR_MESSAGE(c1, c2, msg)      TEST_ASSERT_EQUAL_UINT32_MESSAGE(c1.full, c2.full, msg)
     36 
     37 #ifdef __cplusplus
     38 } /*extern "C"*/
     39 #endif
     40 
     41 #endif /*LV_UNITY_SUPPORT_H*/
     42