fix tests

This commit is contained in:
lixianjing 2022-11-30 18:20:19 +08:00
parent 8d9b9df5b8
commit f24d67034e
2 changed files with 6 additions and 3 deletions

View File

@ -526,7 +526,8 @@ TEST(Edit, intputing2) {
TEST(Edit, intputing3) {
wheel_event_t evt;
widget_t* w1 = edit_create(NULL, 10, 20, 30, 40);
widget_t* win = window_create(NULL, 0, 0, 0, 0);
widget_t* w1 = edit_create(win, 10, 20, 30, 40);
wheel_event_init(&evt, EVT_WHEEL, w1, 0);
ASSERT_EQ(widget_get_prop_bool(w1, WIDGET_PROP_INPUTING, TRUE), FALSE);

View File

@ -91,7 +91,8 @@ TEST(MLEdit, events) {
TEST(MLEdit, intputing1) {
pointer_event_t evt;
widget_t* w1 = mledit_create(NULL, 10, 20, 30, 40);
widget_t* win = window_create(NULL, 0, 0, 0, 0);
widget_t* w1 = mledit_create(win, 10, 20, 30, 40);
pointer_event_init(&evt, EVT_POINTER_DOWN, w1, 0, 0);
ASSERT_EQ(widget_get_prop_bool(w1, WIDGET_PROP_INPUTING, TRUE), FALSE);
@ -117,7 +118,8 @@ TEST(MLEdit, intputing2) {
TEST(MLEdit, intputing3) {
wheel_event_t evt;
widget_t* w1 = mledit_create(NULL, 10, 20, 30, 40);
widget_t* win = window_create(NULL, 0, 0, 0, 0);
widget_t* w1 = mledit_create(win, 10, 20, 30, 40);
wheel_event_init(&evt, EVT_WHEEL, w1, 0);
ASSERT_EQ(widget_get_prop_bool(w1, WIDGET_PROP_INPUTING, TRUE), FALSE);