Changeset 6a87f28 in mainline for uspace/lib/gfxfont/test/font.c


Ignore:
Timestamp:
2021-02-25T16:48:13Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bac8acab
Parents:
26853ebc
Message:

First attempt at printing text in text-mode via GFX

File:
1 edited

Legend:

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

    r26853ebc r6a87f28  
    9898}
    9999
     100/** Test creating and destroying text-mode font */
     101PCUT_TEST(create_textmode_destroy)
     102{
     103        gfx_typeface_t *tface;
     104        gfx_font_t *font;
     105        gfx_context_t *gc;
     106        test_gc_t tgc;
     107        errno_t rc;
     108
     109        rc = gfx_context_new(&test_ops, (void *)&tgc, &gc);
     110        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     111
     112        rc = gfx_typeface_create(gc, &tface);
     113        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     114
     115        rc = gfx_font_create_textmode(tface, &font);
     116        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     117
     118        gfx_font_close(font);
     119        gfx_typeface_destroy(tface);
     120
     121        rc = gfx_context_delete(gc);
     122        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     123}
     124
    100125/** Test gfx_font_get_metrics() */
    101126PCUT_TEST(get_metrics)
Note: See TracChangeset for help on using the changeset viewer.