Ignore:
File:
1 edited

Legend:

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

    r4583015 r9eb8d12  
    135135
    136136        gfx_text_fmt_init(&fmt);
    137         fmt.font = font;
    138137        fmt.color = color;
    139138        pos.x = 0;
    140139        pos.y = 0;
    141140
    142         rc = gfx_puttext(&pos, &fmt, "Hello world!");
     141        rc = gfx_puttext(font, &pos, &fmt, "Hello world!");
    143142        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    144143
     
    182181
    183182        gfx_text_fmt_init(&fmt);
    184         fmt.font = font;
    185183        fmt.color = color;
    186184        pos.x = 0;
    187185        pos.y = 0;
    188186
    189         rc = gfx_puttext(&pos, &fmt, "Hello world!");
     187        rc = gfx_puttext(font, &pos, &fmt, "Hello world!");
    190188        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    191189
     
    247245
    248246        gfx_text_fmt_init(&fmt);
    249         fmt.font = font;
    250247        anchor.x = 10;
    251248        anchor.y = 0;
     
    253250        fpos.x = 9;
    254251        fpos.y = 0;
    255         off = gfx_text_find_pos(&anchor, &fmt, "Aii", &fpos);
     252        off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos);
    256253        PCUT_ASSERT_INT_EQUALS(0, off);
    257254
    258255        fpos.x = 10;
    259256        fpos.y = 0;
    260         off = gfx_text_find_pos(&anchor, &fmt, "Aii", &fpos);
     257        off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos);
    261258        PCUT_ASSERT_INT_EQUALS(0, off);
    262259
    263260        fpos.x = 11;
    264261        fpos.y = 0;
    265         off = gfx_text_find_pos(&anchor, &fmt, "Aii", &fpos);
     262        off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos);
    266263        PCUT_ASSERT_INT_EQUALS(0, off);
    267264
    268265        fpos.x = 19;
    269266        fpos.y = 0;
    270         off = gfx_text_find_pos(&anchor, &fmt, "Aii", &fpos);
     267        off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos);
    271268        PCUT_ASSERT_INT_EQUALS(1, off);
    272269
    273270        fpos.x = 20;
    274271        fpos.y = 0;
    275         off = gfx_text_find_pos(&anchor, &fmt, "Aii", &fpos);
     272        off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos);
    276273        PCUT_ASSERT_INT_EQUALS(2, off);
    277274
    278275        fpos.x = 21;
    279276        fpos.y = 0;
    280         off = gfx_text_find_pos(&anchor, &fmt, "Aii", &fpos);
     277        off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos);
    281278        PCUT_ASSERT_INT_EQUALS(3, off);
    282279
    283280        fpos.x = 22;
    284281        fpos.y = 0;
    285         off = gfx_text_find_pos(&anchor, &fmt, "Aii", &fpos);
     282        off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos);
    286283        PCUT_ASSERT_INT_EQUALS(3, off);
    287284
     
    321318        anchor.y = 0;
    322319        gfx_text_fmt_init(&fmt);
    323         fmt.font = font;
    324320
    325321        fpos.x = 9;
    326322        fpos.y = 0;
    327         off = gfx_text_find_pos(&anchor, &fmt, "Abc", &fpos);
     323        off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos);
    328324        PCUT_ASSERT_INT_EQUALS(0, off);
    329325
    330326        fpos.x = 10;
    331327        fpos.y = 0;
    332         off = gfx_text_find_pos(&anchor, &fmt, "Abc", &fpos);
     328        off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos);
    333329        PCUT_ASSERT_INT_EQUALS(0, off);
    334330
    335331        fpos.x = 11;
    336332        fpos.y = 0;
    337         off = gfx_text_find_pos(&anchor, &fmt, "Abc", &fpos);
     333        off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos);
    338334        PCUT_ASSERT_INT_EQUALS(1, off);
    339335
    340336        fpos.x = 12;
    341337        fpos.y = 0;
    342         off = gfx_text_find_pos(&anchor, &fmt, "Abc", &fpos);
     338        off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos);
    343339        PCUT_ASSERT_INT_EQUALS(2, off);
    344340
    345341        fpos.x = 13;
    346342        fpos.y = 0;
    347         off = gfx_text_find_pos(&anchor, &fmt, "Abc", &fpos);
     343        off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos);
    348344        PCUT_ASSERT_INT_EQUALS(3, off);
    349345
    350346        fpos.x = 14;
    351347        fpos.y = 0;
    352         off = gfx_text_find_pos(&anchor, &fmt, "Abc", &fpos);
     348        off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos);
    353349        PCUT_ASSERT_INT_EQUALS(3, off);
    354350
     
    389385        anchor.y = 20;
    390386        gfx_text_fmt_init(&fmt);
    391         fmt.font = font;
    392387        fmt.color = color;
    393388
    394         gfx_text_cont(&anchor, &fmt, "Abc", &cpos, &cfmt);
     389        gfx_text_cont(font, &anchor, &fmt, "Abc", &cpos, &cfmt);
    395390
    396391        PCUT_ASSERT_INT_EQUALS(13, cpos.x);
     
    436431        anchor.y = 20;
    437432        gfx_text_fmt_init(&fmt);
    438         fmt.font = font;
    439433        fmt.color = color;
    440434
    441         gfx_text_rect(&anchor, &fmt, "Abc", &rect);
     435        gfx_text_rect(font, &anchor, &fmt, "Abc", &rect);
    442436
    443437        PCUT_ASSERT_INT_EQUALS(10, rect.p0.x);
Note: See TracChangeset for help on using the changeset viewer.