mirror of
https://github.com/storytold/texturecraft.git
synced 2026-11-30 10:03:56 +01:00
test(path-cache): a filled path above an edit keeps its tiles from the cache
Covers the footprint recorded by commit_fill; emptying it left every other test green. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
14f02e5fe7
commit
589eb4c764
1 file changed
+9
@@ -683,6 +683,15 @@ mod tests {
|
||||
assert_eq!(edit_row(&mut s, eid, 0, 0.79), [true, false, true], "a path over the change repaints");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_filled_path_above_an_edit_keeps_its_tiles() {
|
||||
// The stroke at row 0.2 is edited; the closed, filled path above it lies in other tiles.
|
||||
let (mut s, eid) = with_paths(&[0.2]);
|
||||
execute(&mut s, "tool.path", &json!({"uvPoints": [[0.1, 0.7], [0.5, 0.7], [0.5, 0.9], [0.1, 0.9]], "closed": true, "fill": true, "commit": true}))
|
||||
.unwrap();
|
||||
assert_eq!(edit_row(&mut s, eid, 0, 0.22), [true, false], "the fill above comes from the cache, with its pixels");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn removing_a_path_keeps_the_paths_above() {
|
||||
let (mut s, eid) = with_paths(&[0.2, 0.45, 0.8]);
|
||||
|
||||
Reference in new issue
Block a user