Changeset 338d0935 in mainline for uspace/srv/hid/display/test/client.c
- Timestamp:
- 2020-03-02T11:22:01Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a2e104e
- Parents:
- 7bb45e3
- git-author:
- Jiri Svoboda <jiri@…> (2020-02-01 11:18:50)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-03-02 11:22:01)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/test/client.c
r7bb45e3 r338d0935 163 163 } 164 164 165 /** Test ds_client_get_event(), ds_client_post_close_event(). */ 166 PCUT_TEST(client_get_post_close_event) 167 { 168 ds_display_t *disp; 169 ds_client_t *client; 170 ds_window_t *wnd; 171 display_wnd_params_t params; 172 ds_window_t *rwindow; 173 display_wnd_ev_t revent; 174 bool called_cb = NULL; 175 errno_t rc; 176 177 rc = ds_display_create(NULL, &disp); 178 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 179 180 rc = ds_client_create(disp, &test_ds_client_cb, &called_cb, &client); 181 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 182 183 display_wnd_params_init(¶ms); 184 params.rect.p0.x = params.rect.p0.y = 0; 185 params.rect.p1.x = params.rect.p1.y = 1; 186 187 rc = ds_window_create(client, ¶ms, &wnd); 188 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 189 190 PCUT_ASSERT_FALSE(called_cb); 191 192 rc = ds_client_get_event(client, &rwindow, &revent); 193 PCUT_ASSERT_ERRNO_VAL(ENOENT, rc); 194 195 rc = ds_client_post_close_event(client, wnd); 196 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 197 PCUT_ASSERT_TRUE(called_cb); 198 199 rc = ds_client_get_event(client, &rwindow, &revent); 200 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 201 PCUT_ASSERT_EQUALS(wnd, rwindow); 202 PCUT_ASSERT_EQUALS(wev_close, revent.etype); 203 204 rc = ds_client_get_event(client, &rwindow, &revent); 205 PCUT_ASSERT_ERRNO_VAL(ENOENT, rc); 206 207 ds_window_destroy(wnd); 208 ds_client_destroy(client); 209 ds_display_destroy(disp); 210 } 211 165 212 /** Test ds_client_get_event(), ds_client_post_focus_event(). */ 166 213 PCUT_TEST(client_get_post_focus_event)
Note:
See TracChangeset
for help on using the changeset viewer.