mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-03 04:25:52 -05:00
The Affinity raster tests compared decoded pixels with CRCs captured from the reader's own output, so a decoding error present when the CRC was taken would pass. They now read the image's tiles straight from the archive (256-byte by 256-row planes, states 2 and 4), interleave them, scale 16-bit samples with rounding, and compare the whole buffer. The Affinity 3 signatures drop the CRC of the model's Debug output and keep the feature counts. The DXF golden test no longer rewrites its expected files when WRITE_DXF_GOLDENS is set. Each golden file is first checked against the drawing it should hold (rectangle corners, circle center, radius and bulges, ACI and true colors, lineweights), and a mismatch saves the output to the temp directory for review.
30 lines
996 B
TOML
30 lines
996 B
TOML
[package]
|
|
name = "vectorcraft-affinity"
|
|
description = "craft-affinity under its old name, for the corpus tests and fuzz targets"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
# Synthetic-container builders for tests and fuzz seeds; not an Affinity exporter.
|
|
synth = ["craft-affinity/synth"]
|
|
|
|
[dependencies]
|
|
craft-affinity = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
proptest = { workspace = true }
|
|
# The tests build containers and decode previews.
|
|
craft-image-codecs = { workspace = true }
|
|
# tests/it's `import_limits`, `outline_limits` and `text` modules need `synth`, also when this crate
|
|
# is tested without vectorcraft-engine (`cargo xtask ci shard`).
|
|
vectorcraft-affinity = { path = ".", features = ["synth"] }
|
|
|
|
# The files of other crates that this crate's tests compile or read, for CI's test selection.
|
|
[package.metadata.craft]
|
|
reads = ["xtask/affinity-corpus.sha256", "xtask/src/sha256.rs"]
|