Changeset 8a9a41e in mainline for uspace/lib/ui/test/slider.c


Ignore:
Timestamp:
2021-10-24T08:28:43Z (2 years ago)
Author:
GitHub <noreply@…>
Children:
f628215
Parents:
2ce943a (diff), cd981f2a (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:
Erik Kučák <35500848+Riko196@…> (2021-10-24 08:28:43)
git-committer:
GitHub <noreply@…> (2021-10-24 08:28:43)
Message:

Merge branch 'HelenOS:master' into master

File:
1 edited

Legend:

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

    r2ce943a r8a9a41e  
    152152}
    153153
    154 /** Paint slider */
    155 PCUT_TEST(paint)
     154/** Paint slider in graphics mode */
     155PCUT_TEST(paint_gfx)
    156156{
    157157        errno_t rc;
     
    172172        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    173173
    174         rc = ui_slider_paint(slider);
     174        rc = ui_slider_paint_gfx(slider);
     175        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     176
     177        ui_slider_destroy(slider);
     178        ui_resource_destroy(resource);
     179
     180        rc = gfx_context_delete(gc);
     181        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     182}
     183
     184/** Paint slider in text mode */
     185PCUT_TEST(paint_text)
     186{
     187        errno_t rc;
     188        gfx_context_t *gc = NULL;
     189        test_gc_t tgc;
     190        ui_resource_t *resource = NULL;
     191        ui_slider_t *slider;
     192
     193        memset(&tgc, 0, sizeof(tgc));
     194        rc = gfx_context_new(&ops, &tgc, &gc);
     195        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     196
     197        rc = ui_resource_create(gc, false, &resource);
     198        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     199        PCUT_ASSERT_NOT_NULL(resource);
     200
     201        rc = ui_slider_create(resource, "Hello", &slider);
     202        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     203
     204        rc = ui_slider_paint_text(slider);
    175205        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    176206
Note: See TracChangeset for help on using the changeset viewer.