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

Function test_write_text_clip

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

Source from the content-addressed store, hash-verified

438
439#[test]
440fn test_write_text_clip() {
441 Tester::with_font(size(20, 30), &FONT_5X8)
442 .op(|l| {
443 l.set_sync(false);
444 l.set_draw_color((250, 251, 252));
445 l.write_text(PixelsXY::new(17, 27), "Hi").unwrap()
446 })
447 .expect_damage(xy(17, 27), xy(19, 29))
448 .expect_pixel(xy(17, 27), (250, 251, 252))
449 .expect_pixel(xy(18, 27), (250, 251, 252))
450 .expect_pixel(xy(19, 27), (250, 251, 252))
451 .expect_pixel(xy(18, 28), (250, 251, 252))
452 .expect_pixel(xy(18, 29), (250, 251, 252))
453 .expect_pixel(xy(19, 29), (250, 251, 252))
454 .check();
455}
456
457#[test]
458fn test_write_text_wide_font() {

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