diff options
Diffstat (limited to 'tests/common/test_surface_integration.c')
| -rw-r--r-- | tests/common/test_surface_integration.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/common/test_surface_integration.c b/tests/common/test_surface_integration.c index 887f254..1dca7c8 100644 --- a/tests/common/test_surface_integration.c +++ b/tests/common/test_surface_integration.c @@ -274,10 +274,12 @@ int main(int argc, char **argv) assert(double_click >= 1 && double_click <= 10000); assert(yasl_drag_cancel() == 0); - /* Without a pointer press these may fail with an errno; they must simply return. */ - assert(yasl_surface_begin_move_resize(s, 0) <= 0); - assert(yasl_surface_show_window_menu(s, 1, 1) <= 0); - assert(yasl_drag_start(s, NULL) <= 0); + /* Nothing presses a button here, so calls that need a press report ESTALE. */ + int no_press[] = {yasl_surface_begin_move_resize(s, 0), + yasl_surface_begin_move_resize(s, YASL_EDGE_BOTTOM | YASL_EDGE_RIGHT), + yasl_surface_show_window_menu(s, 1, 1), yasl_drag_start(s, NULL)}; + for (size_t i = 0; i < sizeof(no_press) / sizeof(no_press[0]); i++) + assert(no_press[i] == -ESTALE || no_press[i] == -ENOTSUP); drain(); /* A popup needs an input grab to open; if it opens, its parent owns it. */ @@ -288,7 +290,7 @@ int main(int argc, char **argv) yasl_surface *popup = yasl_popup_create(s, &popup_options); uintptr_t popup_id = (uintptr_t)popup; if (!popup) { - assert(errno != 0); + assert(errno == ESTALE); } else { assert(listed(display, popup_id)); assert(yasl_popup_reposition(popup, &popup_options) <= 0); |
