Function xray::assert_screenshot_test[][src]

pub fn assert_screenshot_test<S: ScreenshotIo, C: ScreenshotCaptor>(
    screenshot_io: S,
    screenshot_captor: C,
    x: i32,
    y: i32,
    width: u32,
    height: u32
)

Tests the rendered image against a screenshot and panics if the images do not match or are unable to be taken.

The reference image is loaded using screenshot_io.load_reference(), while the test image is captured using screenshot_captor.capture_image(x, y, width, height).