1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 14:49:06 -04:00

Add Harness::debug_open_snapshot helper (#7590)

Adds a helper to quickly see whats going on in a kittest test.

Not all test have snapshots, but when debugging tests it might still be
useful to see whats actually going on, so this adds a helper fn that
renders a snapshot image to a temporary file and opens it with the
default image viewer:



https://github.com/user-attachments/assets/08785850-0a12-4572-b9b5-cea36951081c
This commit is contained in:
Lucas Meurer
2025-10-07 14:39:22 +02:00
committed by GitHub
parent ab461f4115
commit d83f4500a3
6 changed files with 97 additions and 11 deletions

View File

@@ -39,7 +39,7 @@ disallowed-methods = [
# but we cannot disable them all here (because of e.g. https://github.com/rust-lang/rust-clippy/issues/10406)
# so we do that in `clipppy_wasm.toml` instead.
{ path = "std::env::temp_dir", readon = "Use the tempdir crate instead" },
{ path = "std::env::temp_dir", readon = "Use the tempfile crate instead" },
{ path = "std::panic::catch_unwind", reason = "We compile with `panic = abort" },
{ path = "std::thread::spawn", readon = "Use `std::thread::Builder` and name the thread" },
]