Changeset 692c7f40 in mainline for uspace/app/nav/test/nav.c
- Timestamp:
- 2021-10-25T00:32:45Z (2 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1eb0fafe
- Parents:
- 2fb49522
- git-author:
- Jiri Svoboda <jiri@…> (2021-10-13 18:40:48)
- git-committer:
- jxsvoboda <5887334+jxsvoboda@…> (2021-10-25 00:32:45)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/nav/test/nav.c
r2fb49522 r692c7f40 47 47 } 48 48 49 /** navigator_get_active_panel() returns the active panel */ 50 PCUT_TEST(get_active_panel) 51 { 52 navigator_t *nav; 53 panel_t *panel; 54 errno_t rc; 55 56 rc = navigator_create(UI_DISPLAY_NULL, &nav); 57 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 58 59 /* First panel should be active at the beginning */ 60 panel = navigator_get_active_panel(nav); 61 PCUT_ASSERT_EQUALS(nav->panel[0], panel); 62 63 navigator_destroy(nav); 64 } 65 66 /** navigator_switch_panel() switches to a different panel */ 67 PCUT_TEST(switch_panel) 68 { 69 navigator_t *nav; 70 panel_t *panel; 71 errno_t rc; 72 73 rc = navigator_create(UI_DISPLAY_NULL, &nav); 74 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 75 76 /* First panel should be active at the beginning */ 77 panel = navigator_get_active_panel(nav); 78 PCUT_ASSERT_EQUALS(nav->panel[0], panel); 79 80 navigator_switch_panel(nav); 81 82 /* Second panel should be active now */ 83 panel = navigator_get_active_panel(nav); 84 PCUT_ASSERT_EQUALS(nav->panel[1], panel); 85 86 navigator_switch_panel(nav); 87 88 /* First panel should be active again */ 89 panel = navigator_get_active_panel(nav); 90 PCUT_ASSERT_EQUALS(nav->panel[0], panel); 91 92 navigator_destroy(nav); 93 } 94 49 95 PCUT_EXPORT(nav);
Note:
See TracChangeset
for help on using the changeset viewer.