Skip to content

Commit

Permalink
Add test to verify default parameter on rotate_about_center_no_crop
Browse files Browse the repository at this point in the history
  • Loading branch information
Tikitikitikidesuka committed Oct 30, 2024
1 parent 292fa64 commit 9427e98
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/regression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,24 @@ fn test_rotate_no_crop_bicubic_rgba() {
);
}

#[test]
fn test_rotate_no_crop_default_color() {
fn rotate_nearest_about_center_no_crop_default_red(image: &RgbaImage) -> RgbaImage {
rotate_about_center_no_crop(
image,
std::f32::consts::PI / 4f32,
Interpolation::Nearest,
Rgba([255, 0, 0, 255]),
)
}
compare_to_truth_with_tolerance(
"elephant_rgba.png",
"elephant_rotate_no_crop_nearest_default_red_rgba.png",
rotate_nearest_about_center_no_crop_default_red,
2,
)
}

#[test]
fn test_affine_nearest_rgb() {
fn affine_nearest(image: &RgbImage) -> RgbImage {
Expand Down

0 comments on commit 9427e98

Please sign in to comment.