Files
LCUI/tests/main.c
T

96 lines
3.1 KiB
C

/*
* tests/main.c
*
* Copyright (c) 2023-2026, Liu Chao <i@lc-soft.io> All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* This file is part of LCUI, distributed under the MIT License found in the
* LICENSE.TXT file in the root directory of this source tree.
*/
#include <LCUI.h>
#include <ctest.h>
extern void test_settings(void);
extern void test_clipboard(void);
extern void test_mainloop(void);
extern void test_router_components(void);
extern void test_widget_event(void);
extern void test_widget_rect(void);
extern void test_css_inheritance(void);
extern void test_text_resize(void);
extern void test_text_decoration(void);
extern void test_textinput(void);
extern void test_font_face(void);
extern void test_widget_opacity(void);
extern void test_block_layout(void);
extern void test_flex_layout(void);
extern void test_flex_layout_percentage_wrap(void);
extern void test_scrollbar(void);
extern void test_progress(void);
extern void test_label(void);
extern void test_checkbox(void);
extern void test_field(void);
extern void test_radio_group(void);
extern void test_portal(void);
extern void test_select(void);
extern void test_cursor(void);
extern void test_icon(void);
extern void test_button(void);
extern void test_badge(void);
extern void test_alert(void);
extern void test_item(void);
extern void test_empty(void);
extern void test_draw_backend(void);
extern void test_spinner(void);
extern void test_spinner_perf(void);
extern void test_shimmer(void);
static const ctest_suite_t suites[] = {
{ "settings", test_settings },
{ "clipboard", test_clipboard },
{ "mainloop", test_mainloop },
{ "router components", test_router_components },
{ "widget event", test_widget_event },
{ "widget rect", test_widget_rect },
{ "css inheritance", test_css_inheritance },
{ "text resize", test_text_resize },
{ "text decoration", test_text_decoration },
{ "textinput", test_textinput },
{ "font face", test_font_face },
{ "widget opacity", test_widget_opacity },
{ "block layout", test_block_layout },
{ "flex layout", test_flex_layout },
{ "flex layout percentage wrap", test_flex_layout_percentage_wrap },
{ "scrollbar", test_scrollbar },
{ "progress", test_progress },
{ "label", test_label },
{ "checkbox", test_checkbox },
{ "field", test_field },
{ "radio-group", test_radio_group },
{ "portal", test_portal },
{ "select", test_select },
{ "cursor", test_cursor },
{ "icon", test_icon },
{ "button", test_button },
{ "badge", test_badge },
{ "alert", test_alert },
{ "item", test_item },
{ "empty", test_empty },
{ "draw backend", test_draw_backend },
{ "spinner", test_spinner },
{ "spinner perf", test_spinner_perf },
{ "shimmer", test_shimmer },
{ NULL, NULL }
};
int main(int argc, char **argv)
{
logger_set_level(LOGGER_LEVEL_ERROR);
if (ctest_parse_args(argc, argv) != 0) {
return 1;
}
return ctest_run_suites(suites);
}