Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gfxfont/test/font.c

    r7470d97 rd884672  
    11/*
    2  * Copyright (c) 2021 Jiri Svoboda
     2 * Copyright (c) 2020 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3939PCUT_TEST_SUITE(font);
    4040
    41 static errno_t testgc_set_clip_rect(void *, gfx_rect_t *);
    4241static errno_t testgc_set_color(void *, gfx_color_t *);
    4342static errno_t testgc_fill_rect(void *, gfx_rect_t *);
     
    4948
    5049static gfx_context_ops_t test_ops = {
    51         .set_clip_rect = testgc_set_clip_rect,
    5250        .set_color = testgc_set_color,
    5351        .fill_rect = testgc_fill_rect,
     
    10098}
    10199
    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 
    127100/** Test gfx_font_get_metrics() */
    128101PCUT_TEST(get_metrics)
     
    570543                }
    571544        }
    572 }
    573 
    574 static errno_t testgc_set_clip_rect(void *arg, gfx_rect_t *rect)
    575 {
    576         return EOK;
    577545}
    578546
Note: See TracChangeset for help on using the changeset viewer.