Skip to content

Commit

Permalink
Add integration test for #613
Browse files Browse the repository at this point in the history
  • Loading branch information
lilith committed Nov 18, 2022
1 parent db9c2d3 commit c6039b4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions imageflow_core/tests/visuals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,28 @@ fn test_transparent_png_to_png() {
]
);
}
#[test]
fn test_problematic_png_lossy() {
compare_encoded(
Some(IoTestEnum::Url("https://imageflow-resources.s3.us-west-2.amazonaws.com/test_inputs/png_turns_empty.png".to_owned())),
"test_problematic_png_lossy",
POPULATE_CHECKSUMS,
DEBUG_GRAPH,
Constraints {
similarity: Similarity::AllowOffByOneBytesCount(100),
max_file_size: None
},
vec![
Node::CommandString{
kind: CommandStringKind::ImageResizer4,
value: "w=1230&h=760&png.quality=75&mode=crop&scale=both".to_owned(),
decode: Some(0),
encode: Some(1),
watermarks: None
}
]
);
}

#[test]
fn test_transparent_png_to_png_rounded_corners() {
Expand Down
1 change: 1 addition & 0 deletions imageflow_core/tests/visuals/checksums.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"test_branching_crop_whitespace_gradient_output_1": "01864661ED8AB31EF.png",
"test_branching_crop_whitespace_gradient_output_2": "0B3D16EB972FE0DBB.png",
"test_negatives_in_command_string": "0BA85F7DC751DD69E_0726847C75419A20C",
"test_problematic_png_lossy": "0E5E63543D35A149D.png",
"test_rot_90_and_red_dot": "0176FBE641002F3ED_0AE4839D1D9B04C57",
"test_rot_90_and_red_dot_command_string": "0C790C6600AFBBADA_0AE4839D1D9B04C57",
"test_round_corners_command_string": "05218274046A5989B_0BF80F0AE71CD9A63",
Expand Down

0 comments on commit c6039b4

Please sign in to comment.