test move more source files to src folder
This commit is contained in:
@@ -656,8 +656,8 @@ bool lv_textarea_text_is_selected(const lv_obj_t * obj)
|
|||||||
#if LV_LABEL_TEXT_SELECTION
|
#if LV_LABEL_TEXT_SELECTION
|
||||||
lv_textarea_t * ta = (lv_textarea_t *)obj;
|
lv_textarea_t * ta = (lv_textarea_t *)obj;
|
||||||
|
|
||||||
if((lv_label_get_text_selection_start(ta->label) == LV_DRAW_LABEL_NO_TXT_SEL ||
|
if((lv_label_get_text_selection_start(ta->label) != LV_DRAW_LABEL_NO_TXT_SEL ||
|
||||||
lv_label_get_text_selection_end(ta->label) == LV_DRAW_LABEL_NO_TXT_SEL)) {
|
lv_label_get_text_selection_end(ta->label) != LV_DRAW_LABEL_NO_TXT_SEL)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ WARNINGS += -Wpedantic -pedantic-errors
|
|||||||
#-Wno-unused-value -Wno-unused-parameter
|
#-Wno-unused-value -Wno-unused-parameter
|
||||||
OPTIMIZATION ?= -g0
|
OPTIMIZATION ?= -g0
|
||||||
|
|
||||||
CFLAGS ?= -I$(LVGL_DIR)/ --coverage -Iunity $(DEFINES) $(WARNINGS) $(OPTIMIZATION) -I$(LVGL_DIR) -I.
|
CFLAGS ?= -I$(LVGL_DIR)/ --coverage -Isrc -Iunity $(DEFINES) $(WARNINGS) $(OPTIMIZATION) -I$(LVGL_DIR) -I.
|
||||||
|
|
||||||
LDFLAGS ?= -lpng --coverage
|
LDFLAGS ?= -lpng --coverage
|
||||||
BIN ?= test
|
BIN ?= test
|
||||||
@@ -24,7 +24,7 @@ BIN ?= test
|
|||||||
include ../lvgl.mk
|
include ../lvgl.mk
|
||||||
|
|
||||||
CSRCS += ${TEST_SRC}
|
CSRCS += ${TEST_SRC}
|
||||||
CSRCS += lv_test_init.c
|
CSRCS += src/lv_test_init.c
|
||||||
CSRCS := $(CSRCS) $(EXTRA_CSRCS)
|
CSRCS := $(CSRCS) $(EXTRA_CSRCS)
|
||||||
|
|
||||||
OBJEXT ?= .o
|
OBJEXT ?= .o
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ lvgldirname = os.path.abspath('..')
|
|||||||
lvgldirname = os.path.basename(lvgldirname)
|
lvgldirname = os.path.basename(lvgldirname)
|
||||||
lvgldirname = '"' + lvgldirname + '"'
|
lvgldirname = '"' + lvgldirname + '"'
|
||||||
|
|
||||||
base_defines = '"-DLV_CONF_PATH=' + lvgldirname +'/tests/lv_test_conf.h -DLV_BUILD_TEST"'
|
base_defines = '"-DLV_CONF_PATH=' + lvgldirname +'/tests/src/lv_test_conf.h -DLV_BUILD_TEST"'
|
||||||
|
|
||||||
def build(defines):
|
def build(defines):
|
||||||
global base_defines
|
global base_defines
|
||||||
@@ -19,7 +19,7 @@ def build(defines):
|
|||||||
|
|
||||||
d_all += '"'
|
d_all += '"'
|
||||||
# -s makes it silence
|
# -s makes it silence
|
||||||
cmd = "make -s -j BIN=test.bin " + "MAINSRC=lv_test_main.c LVGL_DIR_NAME=" + lvgldirname + " DEFINES=" + d_all + " OPTIMIZATION=" + optimization
|
cmd = "make -s -j BIN=test.bin " + "MAINSRC=src/lv_test_main.c LVGL_DIR_NAME=" + lvgldirname + " DEFINES=" + d_all + " OPTIMIZATION=" + optimization
|
||||||
|
|
||||||
print("")
|
print("")
|
||||||
print("Build")
|
print("Build")
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -147,14 +147,28 @@ void test_dropdown_render(void)
|
|||||||
lv_obj_set_width(dd2, 200);
|
lv_obj_set_width(dd2, 200);
|
||||||
lv_dropdown_set_selected(dd2, 2);
|
lv_dropdown_set_selected(dd2, 2);
|
||||||
lv_dropdown_open(dd2);
|
lv_dropdown_open(dd2);
|
||||||
|
TEST_ASSERT_TRUE(lv_dropdown_get_selected_highlight(dd2));
|
||||||
|
lv_dropdown_set_selected_highlight(dd2, false);
|
||||||
|
TEST_ASSERT_FALSE(lv_dropdown_get_selected_highlight(dd2));
|
||||||
|
|
||||||
lv_obj_t * dd3 = lv_dropdown_create(lv_scr_act());
|
lv_obj_t * dd3 = lv_dropdown_create(lv_scr_act());
|
||||||
lv_obj_set_style_pad_hor(dd3, 5, 0);
|
lv_obj_set_style_pad_hor(dd3, 5, 0);
|
||||||
lv_obj_set_style_pad_ver(dd3, 20, 0);
|
lv_obj_set_style_pad_ver(dd3, 20, 0);
|
||||||
lv_obj_set_pos(dd3, 500, 150);
|
lv_obj_set_pos(dd3, 500, 150);
|
||||||
|
TEST_ASSERT_EQUAL_PTR(NULL, lv_dropdown_get_text(dd3));
|
||||||
|
lv_dropdown_set_text(dd3, "A text");
|
||||||
|
TEST_ASSERT_EQUAL_STRING("A text", lv_dropdown_get_text(dd3));
|
||||||
|
|
||||||
lv_dropdown_set_selected(dd3, 2);
|
lv_dropdown_set_selected(dd3, 2);
|
||||||
|
|
||||||
|
TEST_ASSERT_EQUAL(LV_DIR_BOTTOM, lv_dropdown_get_dir(dd3));
|
||||||
lv_dropdown_set_dir(dd3, LV_DIR_LEFT);
|
lv_dropdown_set_dir(dd3, LV_DIR_LEFT);
|
||||||
|
TEST_ASSERT_EQUAL(LV_DIR_LEFT, lv_dropdown_get_dir(dd3));
|
||||||
|
|
||||||
|
TEST_ASSERT_EQUAL_STRING(LV_SYMBOL_DOWN, lv_dropdown_get_symbol(dd3));
|
||||||
lv_dropdown_set_symbol(dd3, LV_SYMBOL_LEFT);
|
lv_dropdown_set_symbol(dd3, LV_SYMBOL_LEFT);
|
||||||
|
TEST_ASSERT_EQUAL_STRING(LV_SYMBOL_LEFT, lv_dropdown_get_symbol(dd3));
|
||||||
|
|
||||||
lv_dropdown_set_options(dd3, "a0\na1\na2\na3\na4\na5\na6\na7\na8\na9\na10\na11\na12\na13\na14\na15\na16");
|
lv_dropdown_set_options(dd3, "a0\na1\na2\na3\na4\na5\na6\na7\na8\na9\na10\na11\na12\na13\na14\na15\na16");
|
||||||
lv_dropdown_open(dd3);
|
lv_dropdown_open(dd3);
|
||||||
lv_dropdown_set_selected(dd3, 3);
|
lv_dropdown_set_selected(dd3, 3);
|
||||||
|
|||||||
Reference in New Issue
Block a user