G4: Touch Type drag test treats omitted zero dx as no kerning

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
nrq6993-a11y
2026-10-20 02:23:33 +07:00
committed by bflatastic
co-authored by Cursor
parent 222ec72e28
commit 88bd9bcd9e
+4 -1
View File
@@ -561,7 +561,10 @@ mod tests {
let acts = drag(&mut t, &cx, first, first + Vec2::new(10.0, -4.0));
let p3 = preview(&acts[1]);
assert_eq!(p3["start"], json!(0));
assert!(close(p3["dx"].as_f64().unwrap(), 0.0) && close(p3["dy"].as_f64().unwrap(), 4.0), "{p3}");
assert!(
close(p3.get("dx").and_then(|v| v.as_f64()).unwrap_or(0.0), 0.0) && close(p3["dy"].as_f64().unwrap(), 4.0),
"{p3}"
);
}
#[test]