Changeset c4a53280 in mainline for uspace/app/taskbar/test/wndlist.c
- Timestamp:
- 2022-12-01T14:39:56Z (2 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 795c6f7
- Parents:
- 68d68e9
- git-author:
- Jiri Svoboda <jiri@…> (2022-11-30 18:39:42)
- git-committer:
- Jiri Svoboda <jiri@…> (2022-12-01 14:39:56)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/taskbar/test/wndlist.c
r68d68e9 rc4a53280 407 407 } 408 408 409 /** Test wndlist_last() */ 410 PCUT_TEST(last) 411 { 412 errno_t rc; 413 ui_t *ui = NULL; 414 ui_wnd_params_t params; 415 ui_window_t *window = NULL; 416 ui_fixed_t *fixed = NULL; 417 wndlist_t *wndlist; 418 wndlist_entry_t *entry; 419 420 rc = ui_create_disp(NULL, &ui); 421 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 422 423 ui_wnd_params_init(¶ms); 424 params.caption = "Hello"; 425 426 rc = ui_window_create(ui, ¶ms, &window); 427 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 428 PCUT_ASSERT_NOT_NULL(window); 429 430 rc = ui_fixed_create(&fixed); 431 ui_window_add(window, ui_fixed_ctl(fixed)); 432 433 rc = wndlist_create(window, fixed, &wndlist); 434 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 435 436 rc = wndlist_append(wndlist, 1, "Foo", true); 437 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 438 439 rc = wndlist_append(wndlist, 2, "Bar", true); 440 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 441 442 entry = wndlist_last(wndlist); 443 PCUT_ASSERT_NOT_NULL(entry); 444 PCUT_ASSERT_INT_EQUALS(2, entry->wnd_id); 445 446 wndlist_destroy(wndlist); 447 448 ui_window_destroy(window); 449 ui_destroy(ui); 450 } 451 409 452 /** Test wndlist_count() */ 410 453 PCUT_TEST(count)
Note:
See TracChangeset
for help on using the changeset viewer.