1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-02-04 07:13:00 +08:00

fix(test) add #if guard to exclude test related files from the build

This commit is contained in:
Gabor Kiss-Vamosi 2021-06-02 19:58:15 +02:00
parent dde9ceaa53
commit fc364a466c
4 changed files with 13 additions and 2 deletions

View File

@ -1,4 +1,6 @@
#include "../lvgl.h" #include "../lvgl.h"
#if LV_BUILD_TEST
#include "unity/unity.h" #include "unity/unity.h"
void test_obj_tree_1(void); void test_obj_tree_1(void);
@ -23,3 +25,5 @@ void test_obj_tree_2(void)
lv_obj_clean(lv_scr_act()); lv_obj_clean(lv_scr_act());
TEST_ASSERT_EQUAL(lv_obj_get_child_cnt(lv_scr_act()), 0); TEST_ASSERT_EQUAL(lv_obj_get_child_cnt(lv_scr_act()), 0);
} }
#endif

View File

@ -3,7 +3,7 @@
Copyright (c) 2007-21 Mike Karlesky, Mark VanderVoord, Greg Williams Copyright (c) 2007-21 Mike Karlesky, Mark VanderVoord, Greg Williams
[Released under MIT License. Please refer to license.txt for details] [Released under MIT License. Please refer to license.txt for details]
============================================================================ */ ============================================================================ */
#if LV_BUILD_TEST
#include "unity.h" #include "unity.h"
#include <stddef.h> #include <stddef.h>
@ -2108,3 +2108,5 @@ int UnityTestMatches(void)
#endif /* UNITY_USE_COMMAND_LINE_ARGS */ #endif /* UNITY_USE_COMMAND_LINE_ARGS */
/*-----------------------------------------------*/ /*-----------------------------------------------*/
#endif /*LV_BUILD_TEST*/

View File

@ -3,7 +3,7 @@
Copyright (c) 2007-21 Mike Karlesky, Mark VanderVoord, Greg Williams Copyright (c) 2007-21 Mike Karlesky, Mark VanderVoord, Greg Williams
[Released under MIT License. Please refer to license.txt for details] [Released under MIT License. Please refer to license.txt for details]
========================================== */ ========================================== */
#if LV_BUILD_TEST
#ifndef UNITY_FRAMEWORK_H #ifndef UNITY_FRAMEWORK_H
#define UNITY_FRAMEWORK_H #define UNITY_FRAMEWORK_H
#define UNITY #define UNITY
@ -659,3 +659,5 @@ void verifyTest(void);
} }
#endif #endif
#endif #endif
#endif /*LV_BUILD_TEST*/

View File

@ -3,6 +3,7 @@
Copyright (c) 2007-21 Mike Karlesky, Mark VanderVoord, Greg Williams Copyright (c) 2007-21 Mike Karlesky, Mark VanderVoord, Greg Williams
[Released under MIT License. Please refer to license.txt for details] [Released under MIT License. Please refer to license.txt for details]
========================================== */ ========================================== */
#if LV_BUILD_TEST
#ifndef UNITY_INTERNALS_H #ifndef UNITY_INTERNALS_H
#define UNITY_INTERNALS_H #define UNITY_INTERNALS_H
@ -1037,3 +1038,5 @@ int UnityTestMatches(void);
/* End of UNITY_INTERNALS_H */ /* End of UNITY_INTERNALS_H */
#endif #endif
#endif /*LV_BUILD_TEST*/