Changeset f14a900 in mainline for uspace/lib/ui/test/paint.c


Ignore:
Timestamp:
2021-02-01T19:55:51Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5a68791
Parents:
7020d1f
Message:

Radio button unit tests need work

File:
1 edited

Legend:

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

    r7020d1f rf14a900  
    134134        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    135135
     136        ui_resource_destroy(resource);
     137        rc = gfx_context_delete(gc);
     138        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     139}
     140
     141/** Paint filled circle */
     142PCUT_TEST(filled_circle)
     143{
     144        errno_t rc;
     145        gfx_context_t *gc = NULL;
     146        test_gc_t tgc;
     147        gfx_coord2_t center;
     148
     149        memset(&tgc, 0, sizeof(tgc));
     150        rc = gfx_context_new(&ops, &tgc, &gc);
     151        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     152
     153        /* Paint filled circle / upper-left half */
     154        rc = ui_paint_filled_circle(gc, &center, 10, ui_fcircle_upleft);
     155        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     156
     157        /* Paint filled circle / lower-right half */
     158        rc = ui_paint_filled_circle(gc, &center, 10, ui_fcircle_lowright);
     159        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     160
     161        /* Paint entire filled circle */
     162        rc = ui_paint_filled_circle(gc, &center, 10, ui_fcircle_entire);
     163        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     164
    136165        rc = gfx_context_delete(gc);
    137166        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
Note: See TracChangeset for help on using the changeset viewer.