Changes in uspace/lib/gfxfont/test/font.c [d884672:7470d97] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gfxfont/test/font.c
rd884672 r7470d97 1 1 /* 2 * Copyright (c) 202 0Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 39 39 PCUT_TEST_SUITE(font); 40 40 41 static errno_t testgc_set_clip_rect(void *, gfx_rect_t *); 41 42 static errno_t testgc_set_color(void *, gfx_color_t *); 42 43 static errno_t testgc_fill_rect(void *, gfx_rect_t *); … … 48 49 49 50 static gfx_context_ops_t test_ops = { 51 .set_clip_rect = testgc_set_clip_rect, 50 52 .set_color = testgc_set_color, 51 53 .fill_rect = testgc_fill_rect, … … 98 100 } 99 101 102 /** Test creating and destroying text-mode font */ 103 PCUT_TEST(create_textmode_destroy) 104 { 105 gfx_typeface_t *tface; 106 gfx_font_t *font; 107 gfx_context_t *gc; 108 test_gc_t tgc; 109 errno_t rc; 110 111 rc = gfx_context_new(&test_ops, (void *)&tgc, &gc); 112 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 113 114 rc = gfx_typeface_create(gc, &tface); 115 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 116 117 rc = gfx_font_create_textmode(tface, &font); 118 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 119 120 gfx_font_close(font); 121 gfx_typeface_destroy(tface); 122 123 rc = gfx_context_delete(gc); 124 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 125 } 126 100 127 /** Test gfx_font_get_metrics() */ 101 128 PCUT_TEST(get_metrics) … … 543 570 } 544 571 } 572 } 573 574 static errno_t testgc_set_clip_rect(void *arg, gfx_rect_t *rect) 575 { 576 return EOK; 545 577 } 546 578
Note:
See TracChangeset
for help on using the changeset viewer.