MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_write_text_no_sync

Function test_write_text_no_sync

std/src/gfx/lcd/buffered/tests.rs:402–437  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

400
401#[test]
402fn test_write_text_no_sync() {
403 Tester::with_font(size(20, 30), &FONT_5X8)
404 .op(|l| {
405 l.set_sync(false);
406 l.set_draw_color((250, 251, 252));
407 l.write_text(PixelsXY::new(2, 3), "Hi").unwrap()
408 })
409 .expect_damage(xy(2, 3), xy(10, 8))
410 .expect_pixel(xy(2, 3), (250, 251, 252))
411 .expect_pixel(xy(3, 3), (250, 251, 252))
412 .expect_pixel(xy(4, 3), (250, 251, 252))
413 .expect_pixel(xy(6, 3), (250, 251, 252))
414 .expect_pixel(xy(9, 3), (250, 251, 252))
415 .expect_pixel(xy(3, 4), (250, 251, 252))
416 .expect_pixel(xy(6, 4), (250, 251, 252))
417 .expect_pixel(xy(3, 5), (250, 251, 252))
418 .expect_pixel(xy(4, 5), (250, 251, 252))
419 .expect_pixel(xy(5, 5), (250, 251, 252))
420 .expect_pixel(xy(6, 5), (250, 251, 252))
421 .expect_pixel(xy(8, 5), (250, 251, 252))
422 .expect_pixel(xy(9, 5), (250, 251, 252))
423 .expect_pixel(xy(3, 6), (250, 251, 252))
424 .expect_pixel(xy(6, 6), (250, 251, 252))
425 .expect_pixel(xy(9, 6), (250, 251, 252))
426 .expect_pixel(xy(3, 7), (250, 251, 252))
427 .expect_pixel(xy(6, 7), (250, 251, 252))
428 .expect_pixel(xy(9, 7), (250, 251, 252))
429 .expect_pixel(xy(2, 8), (250, 251, 252))
430 .expect_pixel(xy(3, 8), (250, 251, 252))
431 .expect_pixel(xy(4, 8), (250, 251, 252))
432 .expect_pixel(xy(6, 8), (250, 251, 252))
433 .expect_pixel(xy(8, 8), (250, 251, 252))
434 .expect_pixel(xy(9, 8), (250, 251, 252))
435 .expect_pixel(xy(10, 8), (250, 251, 252))
436 .check();
437}
438
439#[test]
440fn test_write_text_clip() {

Callers

nothing calls this directly

Calls 9

expect_pixelMethod · 0.80
expect_damageMethod · 0.80
opMethod · 0.80
sizeFunction · 0.70
xyFunction · 0.70
checkMethod · 0.45
set_syncMethod · 0.45
set_draw_colorMethod · 0.45
write_textMethod · 0.45

Tested by

no test coverage detected