Skip to content

Commit

Permalink
Always run egui_demo_lib tests with chrono feature
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmerlin committed Oct 5, 2024
1 parent b1fdfcf commit 3b5ee7f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,7 @@ dependencies = [
"criterion",
"document-features",
"egui",
"egui_demo_lib",
"egui_extras",
"egui_kittest",
"log",
Expand Down
3 changes: 3 additions & 0 deletions crates/egui_demo_lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ serde = { workspace = true, optional = true }


[dev-dependencies]
# when running tests we always want to use the `chrono` feature
egui_demo_lib = { features = ["chrono"], workspace = true }

criterion.workspace = true
egui_kittest = { path = "../egui_kittest", features = ["wgpu", "snapshot"] }
wgpu = { workspace = true, features = ["metal"] }
Expand Down
4 changes: 2 additions & 2 deletions crates/egui_demo_lib/tests/snapshots/demos/Widget Gallery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions crates/egui_demo_lib/tests/snapshots/widget_gallery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions crates/egui_kittest/src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ pub fn try_image_snapshot(current: &image::RgbaImage, name: &str) -> Result<(),
///
/// # Panics
/// Panics if the image does not match the snapshot.
#[track_caller]
pub fn image_snapshot(current: &image::RgbaImage, name: &str) {
match try_image_snapshot(current, name) {
Ok(_) => {}
Expand Down

0 comments on commit 3b5ee7f

Please sign in to comment.