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

Function test_write_text_sync

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

Source from the content-addressed store, hash-verified

371
372#[test]
373fn test_write_text_sync() {
374 Tester::with_font(size(20, 30), &FONT_5X8)
375 .op(|l| l.set_draw_color((250, 251, 252)))
376 .op(|l| l.write_text(PixelsXY::new(0, 0), "#").unwrap())
377 .expect_pixel(xy(2, 0), (250, 251, 252))
378 .expect_pixel(xy(4, 0), (250, 251, 252))
379 .expect_pixel(xy(1, 1), (250, 251, 252))
380 .expect_pixel(xy(3, 1), (250, 251, 252))
381 .expect_pixel(xy(0, 2), (250, 251, 252))
382 .expect_pixel(xy(1, 2), (250, 251, 252))
383 .expect_pixel(xy(2, 2), (250, 251, 252))
384 .expect_pixel(xy(3, 2), (250, 251, 252))
385 .expect_pixel(xy(4, 2), (250, 251, 252))
386 .expect_pixel(xy(1, 3), (250, 251, 252))
387 .expect_pixel(xy(3, 3), (250, 251, 252))
388 .expect_pixel(xy(0, 4), (250, 251, 252))
389 .expect_pixel(xy(1, 4), (250, 251, 252))
390 .expect_pixel(xy(2, 4), (250, 251, 252))
391 .expect_pixel(xy(3, 4), (250, 251, 252))
392 .expect_pixel(xy(4, 4), (250, 251, 252))
393 .expect_pixel(xy(1, 5), (250, 251, 252))
394 .expect_pixel(xy(3, 5), (250, 251, 252))
395 .expect_pixel(xy(0, 6), (250, 251, 252))
396 .expect_pixel(xy(2, 6), (250, 251, 252))
397 .expect_op("set_data: from=(0, 0), to=(4, 6), data=[0, 0, 0, 0, 0, 0, 250, 251, 252, 0, 0, 0, 250, 251, 252, 0, 0, 0, 250, 251, 252, 0, 0, 0, 250, 251, 252, 0, 0, 0, 250, 251, 252, 250, 251, 252, 250, 251, 252, 250, 251, 252, 250, 251, 252, 0, 0, 0, 250, 251, 252, 0, 0, 0, 250, 251, 252, 0, 0, 0, 250, 251, 252, 250, 251, 252, 250, 251, 252, 250, 251, 252, 250, 251, 252, 0, 0, 0, 250, 251, 252, 0, 0, 0, 250, 251, 252, 0, 0, 0, 250, 251, 252, 0, 0, 0, 250, 251, 252, 0, 0, 0, 0, 0, 0]")
398 .check();
399}
400
401#[test]
402fn test_write_text_no_sync() {

Callers

nothing calls this directly

Calls 8

expect_opMethod · 0.80
expect_pixelMethod · 0.80
opMethod · 0.80
sizeFunction · 0.70
xyFunction · 0.70
checkMethod · 0.45
set_draw_colorMethod · 0.45
write_textMethod · 0.45

Tested by

no test coverage detected