Changeset 14cbf07 in mainline for uspace/lib/ui/test/selectdialog.c
- Timestamp:
- 2023-05-15T16:19:52Z (2 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2b5628c, 8a4ceaa
- Parents:
- aace43d8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/test/selectdialog.c
raace43d8 r14cbf07 310 310 } 311 311 312 /** ui_select_dialog_list() returns the UI list */ 313 PCUT_TEST(list) 314 { 315 errno_t rc; 316 ui_t *ui = NULL; 317 ui_select_dialog_params_t params; 318 ui_select_dialog_t *dialog = NULL; 319 ui_list_t *list; 320 ui_list_entry_attr_t attr; 321 322 rc = ui_create_disp(NULL, &ui); 323 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 324 325 ui_select_dialog_params_init(¶ms); 326 params.caption = "Select one"; 327 params.prompt = "Please select"; 328 329 rc = ui_select_dialog_create(ui, ¶ms, &dialog); 330 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 331 PCUT_ASSERT_NOT_NULL(dialog); 332 333 list = ui_select_dialog_list(dialog); 334 PCUT_ASSERT_NOT_NULL(list); 335 336 PCUT_ASSERT_INT_EQUALS(0, ui_list_entries_cnt(list)); 337 338 /* Add one entry */ 339 ui_list_entry_attr_init(&attr); 340 attr.caption = "Entry"; 341 rc = ui_select_dialog_append(dialog, &attr); 342 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 343 344 PCUT_ASSERT_INT_EQUALS(1, ui_list_entries_cnt(list)); 345 346 ui_select_dialog_destroy(dialog); 347 ui_destroy(ui); 348 } 349 312 350 static void test_dialog_bok(ui_select_dialog_t *dialog, void *arg, 313 351 void *earg)
Note:
See TracChangeset
for help on using the changeset viewer.