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

Function test_sdl_console_scroll_and_wrap

sdl/src/console.rs:568–589  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

566
567 #[test]
568 fn test_sdl_console_scroll_and_wrap() {
569 let mut test = SdlTest::default();
570
571 test.console().set_color(None, Some(4)).unwrap();
572
573 let mut long_line = String::default();
574 for i in 0..128 {
575 long_line.push((b'a' + (i % 26)) as char);
576 }
577
578 for i in 0..15 {
579 test.console().print(&format!("Line {}", i)).unwrap();
580 }
581 test.console().print(&long_line).unwrap();
582 for i in 0..10 {
583 test.console().print(&format!("Line {}", i)).unwrap();
584 }
585 test.console().print(&long_line).unwrap();
586 test.console().print("End").unwrap();
587
588 test.verify("sdl/src", "sdl-scroll-and-wrap");
589 }
590
591 #[test]
592 fn test_sdl_console_scroll_uses_only_the_text_viewport() {

Callers

nothing calls this directly

Calls 5

consoleMethod · 0.80
pushMethod · 0.80
verifyMethod · 0.80
set_colorMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected