Changeset d70dc1c4 in mainline for uspace/lib/ui/test/paint.c
- Timestamp:
- 2021-01-06T10:06:42Z (3 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7020d1f
- Parents:
- e037cf37
- git-author:
- Jiri Svoboda <jiri@…> (2021-01-05 18:06:37)
- git-committer:
- Jiri Svoboda <jiri@…> (2021-01-06 10:06:42)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/test/paint.c
re037cf37 rd70dc1c4 33 33 #include <stdbool.h> 34 34 #include <ui/paint.h> 35 #include <ui/resource.h> 35 36 36 37 PCUT_INIT; … … 103 104 gfx_color_delete(color2); 104 105 gfx_color_delete(color1); 106 rc = gfx_context_delete(gc); 107 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 108 } 109 110 /** Paint inset frame */ 111 PCUT_TEST(inset_frame) 112 { 113 errno_t rc; 114 gfx_context_t *gc = NULL; 115 ui_resource_t *resource = NULL; 116 test_gc_t tgc; 117 gfx_rect_t rect; 118 gfx_rect_t inside; 119 120 memset(&tgc, 0, sizeof(tgc)); 121 rc = gfx_context_new(&ops, &tgc, &gc); 122 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 123 124 rc = ui_resource_create(gc, &resource); 125 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 126 PCUT_ASSERT_NOT_NULL(resource); 127 128 /* Paint inset frame with NULL 'inside' output parameter */ 129 rc = ui_paint_inset_frame(resource, &rect, NULL); 130 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 131 132 /* Paint inset frame with valid 'inside' output parameter */ 133 rc = ui_paint_inset_frame(resource, &rect, &inside); 134 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 135 105 136 rc = gfx_context_delete(gc); 106 137 PCUT_ASSERT_ERRNO_VAL(EOK, rc);
Note:
See TracChangeset
for help on using the changeset viewer.