summaryrefslogtreecommitdiff
path: root/src/libs/lvgl/tests/lv_test_widgets
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-03-25 15:33:56 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-03-25 15:33:56 (GMT)
commit0d1d67d00715232e0a17e37a05c77bf83d50a2e2 (patch)
tree4a8df6f52ef2a39c3e3d11bd5c774237f44ea9e2 /src/libs/lvgl/tests/lv_test_widgets
parentbfddfc467425891853d8c39451fd2acdcf7b8e77 (diff)
include copy of lvgl
Diffstat (limited to 'src/libs/lvgl/tests/lv_test_widgets')
m---------src/libs/lvgl0
-rw-r--r--src/libs/lvgl/tests/lv_test_widgets/lv_test_label.c69
-rw-r--r--src/libs/lvgl/tests/lv_test_widgets/lv_test_label.h38
3 files changed, 107 insertions, 0 deletions
diff --git a/src/libs/lvgl b/src/libs/lvgl
deleted file mode 160000
-Subproject 23430cf20e32294549fff9b2879a9466dacc19b
diff --git a/src/libs/lvgl/tests/lv_test_widgets/lv_test_label.c b/src/libs/lvgl/tests/lv_test_widgets/lv_test_label.c
new file mode 100644
index 0000000..586ebd2
--- /dev/null
+++ b/src/libs/lvgl/tests/lv_test_widgets/lv_test_label.c
@@ -0,0 +1,69 @@
+/**
+ * @file lv_test_label.c
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../../lvgl.h"
+#include "../lv_test_assert.h"
+#include "lv_test_label.h"
+
+#if LV_BUILD_TEST
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+static void create_copy(void);
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+void lv_test_label(void)
+{
+ lv_test_print("");
+ lv_test_print("===================");
+ lv_test_print("Start lv_label tests");
+ lv_test_print("===================");
+
+#if LV_USE_LABEL
+ create_copy();
+#else
+ lv_test_print("Skip label test: LV_USE_LABEL == 0");
+#endif
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+static void create_copy(void)
+{
+ lv_test_print("");
+ lv_test_print("Create a label");
+ lv_test_print("---------------------------");
+
+ lv_label_create(lv_scr_act(), NULL);
+#if LV_COLOR_DEPTH == 32
+ lv_test_assert_img_eq("lv_test_img32_label_1.png", "Create a label and leave the default settings");
+#endif
+}
+#endif
diff --git a/src/libs/lvgl/tests/lv_test_widgets/lv_test_label.h b/src/libs/lvgl/tests/lv_test_widgets/lv_test_label.h
new file mode 100644
index 0000000..36aac4e
--- /dev/null
+++ b/src/libs/lvgl/tests/lv_test_widgets/lv_test_label.h
@@ -0,0 +1,38 @@
+/**
+ * @file lv_test_label.h
+ *
+ */
+
+#ifndef LV_TEST_LABEL_H
+#define LV_TEST_LABEL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+void lv_test_label(void);
+
+/**********************
+ * MACROS
+ **********************/
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*LV_TEST_CONT_H*/