Changeset 2f106b0 in mainline for uspace/app/taskbar/test/wndlist.c


Ignore:
Timestamp:
2022-11-12T20:48:05Z (13 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade
Children:
a5c7b865
Parents:
c48192e
Message:

Do not show window buttons that do not fit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/taskbar/test/wndlist.c

    rc48192e r2f106b0  
    8686}
    8787
     88/* Test setting window list rectangle */
     89PCUT_TEST(set_rect)
     90{
     91        errno_t rc;
     92        ui_t *ui = NULL;
     93        ui_wnd_params_t params;
     94        ui_window_t *window = NULL;
     95        ui_fixed_t *fixed = NULL;
     96        gfx_rect_t rect;
     97        wndlist_t *wndlist;
     98
     99        rc = ui_create_disp(NULL, &ui);
     100        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     101
     102        ui_wnd_params_init(&params);
     103        params.caption = "Hello";
     104
     105        rc = ui_window_create(ui, &params, &window);
     106        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     107        PCUT_ASSERT_NOT_NULL(window);
     108
     109        rc = ui_fixed_create(&fixed);
     110        ui_window_add(window, ui_fixed_ctl(fixed));
     111
     112        rc = wndlist_create(window, fixed, &wndlist);
     113        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     114
     115        rect.p0.x = 1;
     116        rect.p0.y = 2;
     117        rect.p1.x = 3;
     118        rect.p1.y = 4;
     119        wndlist_set_rect(wndlist, &rect);
     120        PCUT_ASSERT_INT_EQUALS(1, wndlist->rect.p0.x);
     121        PCUT_ASSERT_INT_EQUALS(2, wndlist->rect.p0.y);
     122        PCUT_ASSERT_INT_EQUALS(3, wndlist->rect.p1.x);
     123        PCUT_ASSERT_INT_EQUALS(4, wndlist->rect.p1.y);
     124
     125        wndlist_destroy(wndlist);
     126
     127        ui_window_destroy(window);
     128        ui_destroy(ui);
     129}
     130
    88131/** Test opening WM service */
    89132PCUT_TEST(open_wm)
Note: See TracChangeset for help on using the changeset viewer.