Skip to content

Commit 7b0ef2f

Browse files
committed
image compare sanity test
1 parent db2c886 commit 7b0ef2f

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

crates/img-diff/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
glam = { workspace = true }
9+
glam = { workspace = true, features = ["std"] }
1010
image = { version = "^0.24" }
11-
snafu = "^0.7"
11+
snafu = "^0.7"

crates/img-diff/src/lib.rs

+11
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,14 @@ pub fn assert_img_eq_cfg(filename: &str, seen: impl Into<DynamicImage>, cfg: Dif
217217
pub fn assert_img_eq(filename: &str, seen: impl Into<DynamicImage>) {
218218
assert_img_eq_cfg(filename, seen, DiffCfg::default())
219219
}
220+
221+
#[cfg(test)]
222+
mod test {
223+
use crate::assert_img_eq;
224+
225+
#[test]
226+
fn can_compare_images_sanity() {
227+
let img = image::open("../../test_img/jolt.png").unwrap();
228+
assert_img_eq("jolt.png", img);
229+
}
230+
}

test_img/jolt.png

45.7 KB
Loading

0 commit comments

Comments
 (0)