1 #if LV_BUILD_TEST 2 #include "../lvgl.h" 3 #include "../demos/lv_demos.h" 4 5 #include "unity/unity.h" 6 7 #include "lv_test_helpers.h" 8 #include "lv_test_indev.h" 9 loop_through_stress_test(void)10static void loop_through_stress_test(void) 11 { 12 #if LV_USE_DEMO_STRESS 13 lv_test_indev_wait(LV_DEMO_STRESS_TIME_STEP * 33); /* FIXME: remove magic number of states */ 14 #endif 15 } test_demo_stress(void)16void test_demo_stress(void) 17 { 18 #if LV_USE_DEMO_STRESS 19 lv_demo_stress(); 20 #endif 21 /* loop once to allow objects to be created */ 22 loop_through_stress_test(); 23 uint32_t mem_before = lv_test_get_free_mem(); 24 /* loop 10 more times */ 25 for(uint32_t i = 0; i < 10; i++) { 26 loop_through_stress_test(); 27 } 28 TEST_ASSERT_EQUAL(mem_before, lv_test_get_free_mem()); 29 } 30 31 #endif 32 33