Changeset f0155e4 in mainline for uspace/lib/ui/test/entry.c


Ignore:
Timestamp:
2021-11-04T17:40:24Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0802ab6
Parents:
e3e64f6
Message:

Fix unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/test/entry.c

    re3e64f6 rf0155e4  
    106106PCUT_TEST(set_halign)
    107107{
    108         ui_entry_t *entry;
    109         errno_t rc;
    110 
    111         rc = ui_entry_create(NULL, "Hello", &entry);
     108        errno_t rc;
     109        ui_t *ui = NULL;
     110        ui_window_t *window = NULL;
     111        ui_wnd_params_t params;
     112        ui_entry_t *entry;
     113
     114        rc = ui_create_disp(NULL, &ui);
     115        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     116
     117        ui_wnd_params_init(&params);
     118        params.caption = "Hello";
     119
     120        rc = ui_window_create(ui, &params, &window);
     121        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     122        PCUT_ASSERT_NOT_NULL(window);
     123
     124        rc = ui_entry_create(window, "Hello", &entry);
    112125        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    113126
     
    118131
    119132        ui_entry_destroy(entry);
     133        ui_window_destroy(window);
     134        ui_destroy(ui);
    120135}
    121136
Note: See TracChangeset for help on using the changeset viewer.