Changeset 3c54869 in mainline for uspace/lib/ui/test/pbutton.c
- Timestamp:
- 2023-01-04T20:24:44Z (15 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5d86797
- Parents:
- cdd6fc9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/test/pbutton.c
rcdd6fc9 r3c54869 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 190 190 } 191 191 192 /** Get light gets internal field */ 193 PCUT_TEST(get_light) 194 { 195 ui_pbutton_t *pbutton; 196 errno_t rc; 197 198 rc = ui_pbutton_create(NULL, "Hello", &pbutton); 199 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 200 201 pbutton->light = true; 202 PCUT_ASSERT_TRUE(ui_pbutton_get_light(pbutton)); 203 204 pbutton->light = false; 205 PCUT_ASSERT_FALSE(ui_pbutton_get_light(pbutton)); 206 207 ui_pbutton_destroy(pbutton); 208 } 209 210 /** Set light sets internal field */ 211 PCUT_TEST(set_light) 212 { 213 ui_pbutton_t *pbutton; 214 errno_t rc; 215 216 rc = ui_pbutton_create(NULL, "Hello", &pbutton); 217 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 218 219 ui_pbutton_set_light(pbutton, true); 220 PCUT_ASSERT_TRUE(pbutton->light); 221 222 ui_pbutton_set_light(pbutton, false); 223 PCUT_ASSERT_FALSE(pbutton->light); 224 225 ui_pbutton_destroy(pbutton); 226 } 227 192 228 /** Set caption sets internal field */ 193 229 PCUT_TEST(set_caption)
Note:
See TracChangeset
for help on using the changeset viewer.