diff --git a/tests/test_obj_tree.c b/tests/test_obj_tree.c index 3c3fd46e4..ca34fb806 100644 --- a/tests/test_obj_tree.c +++ b/tests/test_obj_tree.c @@ -1,4 +1,6 @@ #include "../lvgl.h" +#if LV_BUILD_TEST + #include "unity/unity.h" void test_obj_tree_1(void); @@ -23,3 +25,5 @@ void test_obj_tree_2(void) lv_obj_clean(lv_scr_act()); TEST_ASSERT_EQUAL(lv_obj_get_child_cnt(lv_scr_act()), 0); } + +#endif diff --git a/tests/unity/unity.c b/tests/unity/unity.c index be3528fad..872da5b0b 100644 --- a/tests/unity/unity.c +++ b/tests/unity/unity.c @@ -3,7 +3,7 @@ Copyright (c) 2007-21 Mike Karlesky, Mark VanderVoord, Greg Williams [Released under MIT License. Please refer to license.txt for details] ============================================================================ */ - +#if LV_BUILD_TEST #include "unity.h" #include @@ -2108,3 +2108,5 @@ int UnityTestMatches(void) #endif /* UNITY_USE_COMMAND_LINE_ARGS */ /*-----------------------------------------------*/ +#endif /*LV_BUILD_TEST*/ + diff --git a/tests/unity/unity.h b/tests/unity/unity.h index ab986c4b2..0def296f9 100644 --- a/tests/unity/unity.h +++ b/tests/unity/unity.h @@ -3,7 +3,7 @@ Copyright (c) 2007-21 Mike Karlesky, Mark VanderVoord, Greg Williams [Released under MIT License. Please refer to license.txt for details] ========================================== */ - +#if LV_BUILD_TEST #ifndef UNITY_FRAMEWORK_H #define UNITY_FRAMEWORK_H #define UNITY @@ -659,3 +659,5 @@ void verifyTest(void); } #endif #endif + +#endif /*LV_BUILD_TEST*/ diff --git a/tests/unity/unity_internals.h b/tests/unity/unity_internals.h index 75c2df6f7..46eb1dd76 100644 --- a/tests/unity/unity_internals.h +++ b/tests/unity/unity_internals.h @@ -3,6 +3,7 @@ Copyright (c) 2007-21 Mike Karlesky, Mark VanderVoord, Greg Williams [Released under MIT License. Please refer to license.txt for details] ========================================== */ +#if LV_BUILD_TEST #ifndef UNITY_INTERNALS_H #define UNITY_INTERNALS_H @@ -1037,3 +1038,5 @@ int UnityTestMatches(void); /* End of UNITY_INTERNALS_H */ #endif + +#endif /*LV_BUILD_TEST*/