Changes in uspace/lib/gfxfont/test/text.c [4583015:9eb8d12] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gfxfont/test/text.c
r4583015 r9eb8d12 135 135 136 136 gfx_text_fmt_init(&fmt); 137 fmt.font = font;138 137 fmt.color = color; 139 138 pos.x = 0; 140 139 pos.y = 0; 141 140 142 rc = gfx_puttext( &pos, &fmt, "Hello world!");141 rc = gfx_puttext(font, &pos, &fmt, "Hello world!"); 143 142 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 144 143 … … 182 181 183 182 gfx_text_fmt_init(&fmt); 184 fmt.font = font;185 183 fmt.color = color; 186 184 pos.x = 0; 187 185 pos.y = 0; 188 186 189 rc = gfx_puttext( &pos, &fmt, "Hello world!");187 rc = gfx_puttext(font, &pos, &fmt, "Hello world!"); 190 188 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 191 189 … … 247 245 248 246 gfx_text_fmt_init(&fmt); 249 fmt.font = font;250 247 anchor.x = 10; 251 248 anchor.y = 0; … … 253 250 fpos.x = 9; 254 251 fpos.y = 0; 255 off = gfx_text_find_pos( &anchor, &fmt, "Aii", &fpos);252 off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos); 256 253 PCUT_ASSERT_INT_EQUALS(0, off); 257 254 258 255 fpos.x = 10; 259 256 fpos.y = 0; 260 off = gfx_text_find_pos( &anchor, &fmt, "Aii", &fpos);257 off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos); 261 258 PCUT_ASSERT_INT_EQUALS(0, off); 262 259 263 260 fpos.x = 11; 264 261 fpos.y = 0; 265 off = gfx_text_find_pos( &anchor, &fmt, "Aii", &fpos);262 off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos); 266 263 PCUT_ASSERT_INT_EQUALS(0, off); 267 264 268 265 fpos.x = 19; 269 266 fpos.y = 0; 270 off = gfx_text_find_pos( &anchor, &fmt, "Aii", &fpos);267 off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos); 271 268 PCUT_ASSERT_INT_EQUALS(1, off); 272 269 273 270 fpos.x = 20; 274 271 fpos.y = 0; 275 off = gfx_text_find_pos( &anchor, &fmt, "Aii", &fpos);272 off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos); 276 273 PCUT_ASSERT_INT_EQUALS(2, off); 277 274 278 275 fpos.x = 21; 279 276 fpos.y = 0; 280 off = gfx_text_find_pos( &anchor, &fmt, "Aii", &fpos);277 off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos); 281 278 PCUT_ASSERT_INT_EQUALS(3, off); 282 279 283 280 fpos.x = 22; 284 281 fpos.y = 0; 285 off = gfx_text_find_pos( &anchor, &fmt, "Aii", &fpos);282 off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos); 286 283 PCUT_ASSERT_INT_EQUALS(3, off); 287 284 … … 321 318 anchor.y = 0; 322 319 gfx_text_fmt_init(&fmt); 323 fmt.font = font;324 320 325 321 fpos.x = 9; 326 322 fpos.y = 0; 327 off = gfx_text_find_pos( &anchor, &fmt, "Abc", &fpos);323 off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos); 328 324 PCUT_ASSERT_INT_EQUALS(0, off); 329 325 330 326 fpos.x = 10; 331 327 fpos.y = 0; 332 off = gfx_text_find_pos( &anchor, &fmt, "Abc", &fpos);328 off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos); 333 329 PCUT_ASSERT_INT_EQUALS(0, off); 334 330 335 331 fpos.x = 11; 336 332 fpos.y = 0; 337 off = gfx_text_find_pos( &anchor, &fmt, "Abc", &fpos);333 off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos); 338 334 PCUT_ASSERT_INT_EQUALS(1, off); 339 335 340 336 fpos.x = 12; 341 337 fpos.y = 0; 342 off = gfx_text_find_pos( &anchor, &fmt, "Abc", &fpos);338 off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos); 343 339 PCUT_ASSERT_INT_EQUALS(2, off); 344 340 345 341 fpos.x = 13; 346 342 fpos.y = 0; 347 off = gfx_text_find_pos( &anchor, &fmt, "Abc", &fpos);343 off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos); 348 344 PCUT_ASSERT_INT_EQUALS(3, off); 349 345 350 346 fpos.x = 14; 351 347 fpos.y = 0; 352 off = gfx_text_find_pos( &anchor, &fmt, "Abc", &fpos);348 off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos); 353 349 PCUT_ASSERT_INT_EQUALS(3, off); 354 350 … … 389 385 anchor.y = 20; 390 386 gfx_text_fmt_init(&fmt); 391 fmt.font = font;392 387 fmt.color = color; 393 388 394 gfx_text_cont( &anchor, &fmt, "Abc", &cpos, &cfmt);389 gfx_text_cont(font, &anchor, &fmt, "Abc", &cpos, &cfmt); 395 390 396 391 PCUT_ASSERT_INT_EQUALS(13, cpos.x); … … 436 431 anchor.y = 20; 437 432 gfx_text_fmt_init(&fmt); 438 fmt.font = font;439 433 fmt.color = color; 440 434 441 gfx_text_rect( &anchor, &fmt, "Abc", &rect);435 gfx_text_rect(font, &anchor, &fmt, "Abc", &rect); 442 436 443 437 PCUT_ASSERT_INT_EQUALS(10, rect.p0.x);
Note:
See TracChangeset
for help on using the changeset viewer.