Changeset f2cb80a in mainline for uspace/lib/ui/test/checkbox.c
- Timestamp:
- 2024-02-23T17:57:23Z (11 months ago)
- Children:
- 192019f
- Parents:
- 86f862c (diff), 90ba06c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- boba-buba <120932204+boba-buba@…> (2024-02-23 17:57:23)
- git-committer:
- GitHub <noreply@…> (2024-02-23 17:57:23)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/test/checkbox.c
r86f862c rf2cb80a 1 1 /* 2 * Copyright (c) 202 1Jiri Svoboda2 * Copyright (c) 2024 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 151 151 } 152 152 153 /** Get check box checked returns internal field */ 154 PCUT_TEST(get_checked) 155 { 156 ui_checkbox_t *checkbox; 157 errno_t rc; 158 159 rc = ui_checkbox_create(NULL, "Hello", &checkbox); 160 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 161 162 checkbox->checked = false; 163 PCUT_ASSERT_FALSE(ui_checkbox_get_checked(checkbox)); 164 checkbox->checked = true; 165 PCUT_ASSERT_TRUE(ui_checkbox_get_checked(checkbox)); 166 167 ui_checkbox_destroy(checkbox); 168 } 169 170 /** Set check box checked sets internal field */ 171 PCUT_TEST(set_checked) 172 { 173 ui_checkbox_t *checkbox; 174 errno_t rc; 175 176 rc = ui_checkbox_create(NULL, "Hello", &checkbox); 177 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 178 179 ui_checkbox_set_checked(checkbox, true); 180 PCUT_ASSERT_TRUE(checkbox->checked); 181 ui_checkbox_set_checked(checkbox, false); 182 PCUT_ASSERT_FALSE(checkbox->checked); 183 184 ui_checkbox_destroy(checkbox); 185 } 186 153 187 /** Paint check box in graphics mode */ 154 188 PCUT_TEST(paint_gfx)
Note:
See TracChangeset
for help on using the changeset viewer.