Changes in uspace/lib/ui/test/list.c [5e758e4:37087c8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/test/list.c
r5e758e4 r37087c8 1039 1039 } 1040 1040 1041 /** ui_list_entry_set_caption() sets entry captino */1042 PCUT_TEST(entry_set_caption)1043 {1044 ui_t *ui;1045 ui_window_t *window;1046 ui_wnd_params_t params;1047 ui_list_t *list;1048 ui_list_entry_attr_t attr;1049 ui_list_entry_t *entry;1050 errno_t rc;1051 1052 rc = ui_create_disp(NULL, &ui);1053 PCUT_ASSERT_ERRNO_VAL(EOK, rc);1054 1055 ui_wnd_params_init(¶ms);1056 params.caption = "Test";1057 1058 rc = ui_window_create(ui, ¶ms, &window);1059 PCUT_ASSERT_ERRNO_VAL(EOK, rc);1060 1061 rc = ui_list_create(window, true, &list);1062 PCUT_ASSERT_ERRNO_VAL(EOK, rc);1063 1064 ui_list_entry_attr_init(&attr);1065 1066 /* Append entry and get pointer to it */1067 attr.caption = "a";1068 attr.arg = (void *)1;1069 entry = NULL;1070 rc = ui_list_entry_append(list, &attr, &entry);1071 PCUT_ASSERT_ERRNO_VAL(EOK, rc);1072 PCUT_ASSERT_NOT_NULL(entry);1073 1074 /* Change caption */1075 rc = ui_list_entry_set_caption(entry, "b");1076 PCUT_ASSERT_ERRNO_VAL(EOK, rc);1077 PCUT_ASSERT_STR_EQUALS("b", entry->caption);1078 1079 ui_list_destroy(list);1080 ui_window_destroy(window);1081 ui_destroy(ui);1082 }1083 1084 1041 /** ui_list_entries_cnt() returns the number of entries */ 1085 1042 PCUT_TEST(entries_cnt)
Note:
See TracChangeset
for help on using the changeset viewer.