Lines Matching refs:g_bar
10 static lv_obj_t * g_bar = NULL; variable
15 g_bar = lv_bar_create(g_active_screen); in setUp()
25 TEST_ASSERT_EQUAL(0, lv_bar_get_min_value(g_bar)); in test_bar_should_have_valid_default_attributes()
26 TEST_ASSERT_EQUAL(100, lv_bar_get_max_value(g_bar)); in test_bar_should_have_valid_default_attributes()
27 TEST_ASSERT_EQUAL(LV_BAR_MODE_NORMAL, lv_bar_get_mode(g_bar)); in test_bar_should_have_valid_default_attributes()
48 lv_bar_t * bar_ptr = (lv_bar_t *) g_bar; in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
61 lv_obj_remove_style_all(g_bar); in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
62 lv_obj_add_style(g_bar, &bar_style, LV_PART_MAIN); in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
65 lv_obj_set_size(g_bar, bar_width, bar_height); in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
66 lv_bar_set_value(g_bar, bar_value, LV_ANIM_OFF); in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
74 int32_t bar_max_value = lv_bar_get_max_value(g_bar); in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
75 int32_t indicator_part_width = lv_obj_get_content_width(g_bar); in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
101 lv_bar_t * bar_ptr = (lv_bar_t *) g_bar; in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
114 lv_obj_remove_style_all(g_bar); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
115 lv_obj_add_style(g_bar, &bar_style, LV_PART_MAIN); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
118 lv_obj_set_size(g_bar, bar_width, bar_height); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
119 lv_bar_set_value(g_bar, bar_value, LV_ANIM_OFF); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
120 lv_obj_set_style_base_dir(g_bar, LV_BASE_DIR_RTL, 0); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
128 int32_t bar_max_value = lv_bar_get_max_value(g_bar); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
129 int32_t indicator_part_width = lv_obj_get_content_width(g_bar); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
130 int32_t right_padding = lv_obj_get_style_pad_right(g_bar, LV_PART_MAIN); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
211 lv_bar_t * bar_ptr = (lv_bar_t *) g_bar; in test_bar_indicator_area_should_get_smaller_when_padding_is_increased()
221 lv_bar_set_value(g_bar, 50, LV_ANIM_OFF); in test_bar_indicator_area_should_get_smaller_when_padding_is_increased()
230 lv_obj_set_size(g_bar, 100, 50); in test_bar_indicator_area_should_get_smaller_when_padding_is_increased()
233 lv_obj_remove_style_all(g_bar); in test_bar_indicator_area_should_get_smaller_when_padding_is_increased()
234 lv_obj_add_style(g_bar, &bar_style, LV_PART_MAIN); in test_bar_indicator_area_should_get_smaller_when_padding_is_increased()
251 lv_bar_set_value(g_bar, 90, LV_ANIM_OFF); in test_bar_start_value_should_only_change_when_in_range_mode()
252 lv_bar_set_start_value(g_bar, new_start_value, LV_ANIM_OFF); in test_bar_start_value_should_only_change_when_in_range_mode()
255 TEST_ASSERT_EQUAL_INT32(0u, lv_bar_get_start_value(g_bar)); in test_bar_start_value_should_only_change_when_in_range_mode()
258 lv_bar_set_mode(g_bar, LV_BAR_MODE_RANGE); in test_bar_start_value_should_only_change_when_in_range_mode()
259 lv_bar_set_start_value(g_bar, new_start_value, LV_ANIM_OFF); in test_bar_start_value_should_only_change_when_in_range_mode()
261 TEST_ASSERT_EQUAL_INT32(new_start_value, lv_bar_get_start_value(g_bar)); in test_bar_start_value_should_only_change_when_in_range_mode()
267 lv_bar_set_mode(g_bar, LV_BAR_MODE_RANGE); in test_bar_start_value_should_be_smaller_than_current_value_in_range_mode()
268 lv_bar_set_value(g_bar, 50, LV_ANIM_OFF); in test_bar_start_value_should_be_smaller_than_current_value_in_range_mode()
269 lv_bar_set_start_value(g_bar, 100u, LV_ANIM_OFF); in test_bar_start_value_should_be_smaller_than_current_value_in_range_mode()
271 TEST_ASSERT_EQUAL_INT32(lv_bar_get_value(g_bar), lv_bar_get_start_value(g_bar)); in test_bar_start_value_should_be_smaller_than_current_value_in_range_mode()
276 int32_t max_value = lv_bar_get_max_value(g_bar); in test_bar_current_value_should_be_truncated_to_max_value_when_exceeds_it()
279 lv_bar_set_value(g_bar, new_value, LV_ANIM_OFF); in test_bar_current_value_should_be_truncated_to_max_value_when_exceeds_it()
280 TEST_ASSERT_EQUAL_INT32(max_value, lv_bar_get_value(g_bar)); in test_bar_current_value_should_be_truncated_to_max_value_when_exceeds_it()
285 int32_t min_value = lv_bar_get_min_value(g_bar); in test_bar_current_value_should_be_truncated_to_min_value_when_it_is_below_it()
288 lv_bar_set_value(g_bar, new_value, LV_ANIM_OFF); in test_bar_current_value_should_be_truncated_to_min_value_when_it_is_below_it()
289 TEST_ASSERT_EQUAL_INT32(min_value, lv_bar_get_value(g_bar)); in test_bar_current_value_should_be_truncated_to_min_value_when_it_is_below_it()
301 lv_bar_t * bar_ptr = (lv_bar_t *) g_bar; in test_bar_indicator_should_be_drawn_towards_the_min_range_side_after_setting_a_more_negative_value()
304 lv_obj_set_size(g_bar, 100, 50); in test_bar_indicator_should_be_drawn_towards_the_min_range_side_after_setting_a_more_negative_value()
305 lv_bar_set_mode(g_bar, LV_BAR_MODE_SYMMETRICAL); in test_bar_indicator_should_be_drawn_towards_the_min_range_side_after_setting_a_more_negative_value()
306 lv_bar_set_range(g_bar, -100, 100); in test_bar_indicator_should_be_drawn_towards_the_min_range_side_after_setting_a_more_negative_value()
309 lv_bar_set_value(g_bar, 1, LV_ANIM_OFF); in test_bar_indicator_should_be_drawn_towards_the_min_range_side_after_setting_a_more_negative_value()
315 lv_bar_set_value(g_bar, -50, LV_ANIM_OFF); in test_bar_indicator_should_be_drawn_towards_the_min_range_side_after_setting_a_more_negative_value()