Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clippy suggestions. Fixed non-op in inpaint::find_starting_point, add…
…ed test
- Loading branch information
Showing
4 changed files
with
36 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use sciimg::{imagebuffer::ImageBuffer, inpaint}; | ||
|
||
const INPAINT_TEST_IMAGE: &str = "tests/testdata/MSL_MAHLI_INPAINT_Sol2904_V1.png"; | ||
|
||
#[test] | ||
fn test_find_starting_point() { | ||
let inpaint_mask = ImageBuffer::from_file(&String::from(INPAINT_TEST_IMAGE)).unwrap(); | ||
|
||
let start_point = inpaint::find_starting_point(&inpaint_mask); | ||
|
||
assert!(start_point.is_some()); | ||
|
||
let start = start_point.unwrap(); | ||
assert_eq!(1581, start.x); | ||
assert_eq!(15, start.y); | ||
assert_eq!(0, start.score); | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.