MCPcopy Create free account
hub / github.com/endbasic/endbasic / test_sdl_console_peek_pixel_out_of_bounds

Function test_sdl_console_peek_pixel_out_of_bounds

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

Source from the content-addressed store, hash-verified

986
987 #[test]
988 fn test_sdl_console_peek_pixel_out_of_bounds() {
989 let test = SdlTest::default();
990
991 assert_eq!(None, test.console_ref().peek_pixel(PixelsXY::new(-1, 0)).unwrap());
992 assert_eq!(None, test.console_ref().peek_pixel(PixelsXY::new(0, -1)).unwrap());
993
994 let size = test.console_ref().size_pixels().unwrap();
995 assert_eq!(
996 None,
997 test.console_ref().peek_pixel(PixelsXY::new(size.width as i16, 0)).unwrap()
998 );
999 assert_eq!(
1000 None,
1001 test.console_ref().peek_pixel(PixelsXY::new(0, size.height as i16)).unwrap()
1002 );
1003 }
1004
1005 #[test]
1006 fn test_sdl_console_show_cursor() {

Callers

nothing calls this directly

Calls 2

console_refMethod · 0.80
size_pixelsMethod · 0.45

Tested by

no test coverage detected