Changeset 7cc30e9 in mainline for uspace/srv/hid/display/test/window.c
- Timestamp:
- 2022-10-24T17:50:46Z (3 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 913add60
- Parents:
- 7a05d924
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/test/window.c
r7a05d924 r7cc30e9 851 851 } 852 852 853 /** Test ds_window_set_caption() */ 854 PCUT_TEST(window_set_caption) 855 { 856 gfx_context_t *gc; 857 ds_display_t *disp; 858 ds_client_t *client; 859 ds_seat_t *seat; 860 ds_window_t *wnd; 861 display_wnd_params_t params; 862 errno_t rc; 863 864 rc = gfx_context_new(&dummy_ops, NULL, &gc); 865 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 866 867 rc = ds_display_create(gc, df_none, &disp); 868 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 869 870 rc = ds_client_create(disp, NULL, NULL, &client); 871 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 872 873 rc = ds_seat_create(disp, &seat); 874 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 875 876 display_wnd_params_init(¶ms); 877 params.rect.p0.x = params.rect.p0.y = 0; 878 params.rect.p1.x = params.rect.p1.y = 1; 879 880 rc = ds_window_create(client, ¶ms, &wnd); 881 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 882 883 PCUT_ASSERT_EQUALS(wnd->display->cursor[dcurs_arrow], wnd->cursor); 884 885 rc = ds_window_set_caption(wnd, "Hello"); 886 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 887 PCUT_ASSERT_INT_EQUALS(0, str_cmp("Hello", wnd->caption)); 888 889 ds_window_destroy(wnd); 890 ds_seat_destroy(seat); 891 ds_client_destroy(client); 892 ds_display_destroy(disp); 893 } 894 853 895 static errno_t dummy_set_color(void *arg, gfx_color_t *color) 854 896 {
Note:
See TracChangeset
for help on using the changeset viewer.