Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

Integration: Graphic and Asset literals in tests name the fields both sides added (#450 × next)

aiongg6c1d5b75db8b
diff --git a/crates/doc/src/item.rs b/crates/doc/src/item.rs
index 56032291a..5ff0e4956 100644
--- a/crates/doc/src/item.rs
+++ b/crates/doc/src/item.rs
@@ -1418,6 +1418,7 @@ mod tests {
auto_fit: Fitting::None,
fit_align: 4,
crop: [0.0; 4],
+ wrap: Default::default(),
};
let v = serde_json::to_value(&g).unwrap();
assert!(v.get("clip").is_none(), "{v}");
diff --git a/crates/render/src/lib.rs b/crates/render/src/lib.rs
index d23b8dba4..aa8c052ef 100644
--- a/crates/render/src/lib.rs
+++ b/crates/render/src/lib.rs
@@ -1699,6 +1699,7 @@ mod tests {
link: None,
data: Arc::new(png),
pixels: Some((4, 4)),
+ ..Default::default()
}),
);
// A 100 pt image at 100,100 clipped by a triangle with its apex at the top middle.
@@ -1717,6 +1718,7 @@ mod tests {
auto_fit: Default::default(),
fit_align: 4,
crop: [0.0; 4],
+ wrap: Default::default(),
clip: Some(Arc::new(clip.clone())),
});
d.insert_item(SpreadRef::Doc(0), it, None).unwrap();
diff --git a/crates/tools/src/tests.rs b/crates/tools/src/tests.rs
index d586a38ee..e5a860704 100644
--- a/crates/tools/src/tests.rs
+++ b/crates/tools/src/tests.rs
@@ -1033,6 +1033,7 @@ fn graphic_frame(doc: &mut Document) -> ItemId {
asset: designcraft_doc::AssetId(1),
size: (200.0, 100.0),
xf: designcraft_geom::Affine::translate((50.0, 100.0)),
+ clip: None,
auto_fit: Default::default(),
fit_align: 4,
crop: [0.0; 4],