test: update test

This commit is contained in:
Liu Chao
2018-03-19 20:40:36 +08:00
parent a644ed0217
commit a076aa5dfe
3 changed files with 15 additions and 4 deletions
+1 -4
View File
@@ -32,10 +32,7 @@ int main( void )
ret += test_widget_layout();
ret += test_widget_flex_layout();
ret += test_widget_inline_block_layout();
ret += test_widget_rect();/*
ret += test_widget_render();
ret += test_char_render();
ret += test_string_render();*/
ret += test_widget_rect();
PRINT_TEST_RESULT( ret );
return ret;
}
+1
View File
@@ -45,4 +45,5 @@ button {
}
root {
padding: 20px;
box-sizing: border-box;
}
+13
View File
@@ -67,6 +67,7 @@ static int check_menu_short_text( void )
CHECK( menu->height == MENU_HEIGHT );
return ret;
}
static int check_menu_long_text( void )
{
int ret = 0;
@@ -111,6 +112,16 @@ int test_widget_inline_block_layout( void )
int tests_count = 0;
static void SetLongTextItem( void *arg )
{
check_menu_long_text();
}
static void SetShortTextItem( void *arg )
{
check_menu_short_text();
}
int main( void )
{
LCUI_Widget root, pack;
@@ -123,6 +134,8 @@ int main( void )
LCUI_Destroy();
return -ENOENT;
}
LCUITimer_SetTimeout( 2000, SetLongTextItem, NULL );
LCUITimer_SetTimeout( 4000, SetShortTextItem, NULL );
Widget_Append( root, pack );
Widget_Unwrap( pack );
return LCUI_Main();