Changeset 3c54869 in mainline for uspace/lib/ui/test/pbutton.c


Ignore:
Timestamp:
2023-01-04T20:24:44Z (2 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5d86797
Parents:
cdd6fc9
Message:

Highlight active window in task bar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/test/pbutton.c

    rcdd6fc9 r3c54869  
    11/*
    2  * Copyright (c) 2022 Jiri Svoboda
     2 * Copyright (c) 2023 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    190190}
    191191
     192/** Get light gets internal field */
     193PCUT_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 */
     211PCUT_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
    192228/** Set caption sets internal field */
    193229PCUT_TEST(set_caption)
Note: See TracChangeset for help on using the changeset viewer.