Review #988: rustfmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c845c7f9e0
commit
311d75fc97
|
|
@ -342,16 +342,10 @@ mod tests {
|
|||
assert!(t.overlays(&cx).is_empty() && !t.claims_key(&cx, ToolKey::Enter));
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn crop_box_option_requires_exactly_four_finite_numeric_values() {
|
||||
let mut tool = CropImageTool::default();
|
||||
for invalid in [
|
||||
json!([10, "ignored", 20, 30, 40]),
|
||||
json!([10, 20, 30, null, 40]),
|
||||
json!([10, 20, 30, 40, 50]),
|
||||
json!("not a rectangle"),
|
||||
] {
|
||||
for invalid in [json!([10, "ignored", 20, 30, 40]), json!([10, 20, 30, null, 40]), json!([10, 20, 30, 40, 50]), json!("not a rectangle")] {
|
||||
tool.set_option("rect", &invalid);
|
||||
assert!(tool.options().get("rect").is_none(), "invalid box should reset crop: {invalid}");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue