Tests: the command sweeps no longer skip junk scale, spacing and artboard values

The sweeps `every_command_with_junk_params` and
`fuzzed_calls_keep_documents_serializable` skipped every case that set
`object.scale`'s `sx`, `object.transformEach`'s `scaleH` or `scaleV`,
`object.distributeSpacing`'s `spacing`, or `artboard.setProps`'s `x`,
`y`, `width` or `height`. The comment above `KNOWN_BUGS`, the list of
those (command, param) pairs, referred to `#[ignore]`d repro tests, but
`bug_huge_transform_makes_document_unloadable` and
`bug_artboard_huge_props_break_svg` have no `#[ignore]` and run with the
other tests. Since 42df20ca, the commit that added the list,
`Session::edit` returns an error when an edit leaves an artboard or a
selected object with coordinates that are not finite or exceed
`MAX_COORD`, and `object.transformEach` clamps `scaleH` and `scaleV`.

The list and its two checks are removed, so both sweeps run those
cases.
This commit is contained in:
dotCooCoo authored and bflatastic committed 2026-10-11 07:13:37 +07:00
1 parent 68241453dd
commit 9ea392e6ee
1 file changed
-23
-23
View File
@@ -81,23 +81,6 @@ fn every_command_without_a_document() {
assert!(failures.is_empty(), "{}", failures.join("\n"));
}
/// Known bugs (see the `#[ignore]` repro tests below): (command, param key) pairs skipped by the
/// junk sweep so the rest of the sweep stays meaningful.
const KNOWN_BUGS: &[(&str, &str)] = &[
("object.scale", "sx"),
("object.transformEach", "scaleH"),
("object.transformEach", "scaleV"),
("object.distributeSpacing", "spacing"),
("artboard.setProps", "x"),
("artboard.setProps", "y"),
("artboard.setProps", "width"),
("artboard.setProps", "height"),
];
fn known_bug(id: &str, p: &Value) -> bool {
KNOWN_BUGS.iter().any(|(c, k)| *c == id && p.get(*k).is_some())
}
/// Regression: huge column counts used to panic with `capacity overflow`; in every layout and
/// order (#681), with huge and negative spacing too.
#[test]
@@ -157,9 +140,6 @@ fn every_command_with_junk_params() {
cases.truncate(12);
}
for p in &cases {
if known_bug(c.id, p) {
continue;
}
calls += 1;
if let Some(f) = probe(fx, c.id, p) {
failures.push(f);
@@ -494,9 +474,6 @@ fn fuzzed_calls_keep_documents_serializable() {
let k = if k == "path" { continue } else { k };
let mut s = Fixture::Multi.session();
let p = json!({ k.clone(): v });
if known_bug(c.id, &p) {
continue;
}
let ok = catch_quiet(|| s.execute(c.id, &p)).map(|r| r.is_ok()).unwrap_or(false);
if ok && let Err(e) = catch_quiet(|| check_all(&mut s)).unwrap_or_else(|m| Err(format!("panic in checks: {m}"))) {
failures.push(format!("{} {p}: {e}", c.id));