Changeset bb14312 in mainline for uspace/lib/ui/test/entry.c
- Timestamp:
- 2021-06-26T16:40:28Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1215db9
- Parents:
- 69511176
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/test/entry.c
r69511176 rbb14312 270 270 } 271 271 272 /** ui_entry_activate() / ui_entry_deactivate() */ 273 PCUT_TEST(activate_deactivate) 274 { 275 errno_t rc; 276 ui_t *ui = NULL; 277 ui_window_t *window = NULL; 278 ui_wnd_params_t params; 279 ui_entry_t *entry; 280 281 rc = ui_create_disp(NULL, &ui); 282 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 283 284 ui_wnd_params_init(¶ms); 285 params.caption = "Hello"; 286 287 rc = ui_window_create(ui, ¶ms, &window); 288 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 289 PCUT_ASSERT_NOT_NULL(window); 290 291 rc = ui_entry_create(window, "ABC", &entry); 292 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 293 294 PCUT_ASSERT_FALSE(entry->active); 295 296 ui_entry_activate(entry); 297 PCUT_ASSERT_TRUE(entry->active); 298 299 ui_entry_deactivate(entry); 300 PCUT_ASSERT_FALSE(entry->active); 301 302 ui_entry_destroy(entry); 303 ui_window_destroy(window); 304 ui_destroy(ui); 305 } 306 272 307 PCUT_EXPORT(entry);
Note:
See TracChangeset
for help on using the changeset viewer.