mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
CI: one test binary per crate, nextest, line tables only (#3855)
* CI: line tables only for workspace crates, no debug info for dependencies * CI: one integration-test binary per crate Each crate's tests/*.rs files become modules of tests/it/main.rs. Files that change process-wide state (Color Settings, the font database, installed plug-ins, the working directory), the fuzz sweeps and the test targets the Affinity corpus workflow names stay their own binaries. * Docs: name the integration tests' new paths * CI: xtask test with nextest and doctests, one wasm check, clippy --keep-going cargo xtask ci runs the tests with cargo nextest (cargo test when it is not installed), builds them with --lib --bins --tests, runs the doctests as their own step, and checks the wasm crates in one cargo check --keep-going call.
This commit is contained in:
+2
-5
@@ -2,12 +2,9 @@
|
||||
//! layer effects and embedded documents, on original synthetic documents built with the reader's
|
||||
//! `synth` feature (no Affinity software or files were used). The fixtures follow DesignCraft's
|
||||
//! Affinity import tests, whose reader VectorCraft shares.
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
#[path = "support/affinity_docs.rs"]
|
||||
mod affinity_docs;
|
||||
#[path = "../../affinity/tests/support/text_fixture.rs"]
|
||||
mod text_fixture;
|
||||
use crate::affinity_docs;
|
||||
use crate::text_fixture;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
//! stored in the file. Reports the mean difference per artboard (0–255, both on white); with
|
||||
//! `AFFINITY_SAMPLES_OUT` set, writes each board's thumbnail crop and render side by side there.
|
||||
//! Skipped when `AFFINITY_SAMPLES` is unset (as in CI).
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//! Artboard clicks fit the object without changing its art or selection, and are one undo step.
|
||||
//! The second click of a double-click on an object does not fit another artboard, and that
|
||||
//! double-click does not open Artboard Options. Empty artboard space still does.
|
||||
#![allow(clippy::unwrap_used)]
|
||||
|
||||
use serde_json::json;
|
||||
use vectorcraft_doc::NodeId;
|
||||
@@ -1,5 +1,4 @@
|
||||
//! Clear deletes its exact targets, including compound members (#786).
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
use serde_json::json;
|
||||
use vectorcraft_doc::NodeId;
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//! Compound appearance and fill-rule edits from a directly selected member (#1197).
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
use serde_json::{Value, json};
|
||||
use vectorcraft_doc::{NodeId, NodeKind};
|
||||
@@ -1,5 +1,4 @@
|
||||
//! Linked measurements, history, portable artwork and hostile command input.
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
use serde_json::{Value, json};
|
||||
use vectorcraft_engine::{
|
||||
Session, ViewInfo,
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//! Visible art is readable by the Eyedropper without making it editable (#1251).
|
||||
#![allow(clippy::unwrap_used)]
|
||||
|
||||
use serde_json::json;
|
||||
use vectorcraft_doc::NodeId;
|
||||
-2
@@ -1,7 +1,5 @@
|
||||
//! `edit.findReplace` keeps per-paragraph styles lined up with the text when a find or replace
|
||||
//! string holds a line break, as `text.editRange` does.
|
||||
// Integration tests: unwrapping and panicking on failure is fine here, unlike in shipped code (AGENTS.md › Robustness).
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
use serde_json::json;
|
||||
use vectorcraft_doc::{Justify, NodeId, NodeKind};
|
||||
@@ -1,7 +1,5 @@
|
||||
//! Inline graphics in text drawn on the canvas and written to SVG and PDF: a symbol (a red
|
||||
//! circle drawn in code) set inline in a line of type.
|
||||
// Integration tests: unwrapping and panicking on failure is fine here, unlike in shipped code (AGENTS.md › Robustness).
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
use serde_json::{Value, json};
|
||||
use vectorcraft_doc::{Document, NodeId, NodeKind, TextObject};
|
||||
@@ -1,7 +1,5 @@
|
||||
//! Minimal reproductions of engine bugs found by the property tests. Each is `#[ignore]`d with a
|
||||
//! `BUG:` reason until fixed; remove the attribute when the fix lands.
|
||||
// Integration tests: unwrapping and panicking on failure is fine here, unlike in shipped code (AGENTS.md › Robustness).
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
use serde_json::json;
|
||||
use vectorcraft_engine::Session;
|
||||
@@ -1,8 +1,6 @@
|
||||
//! A file whose import left something out isn't written over silently: its hidden text, art or
|
||||
//! layers would be gone for good.
|
||||
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
use serde_json::json;
|
||||
use vectorcraft_engine::Session;
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
//! Integration tests: one test binary for the crate, one module per area.
|
||||
// Unwrapping and panicking on failure is fine here, unlike in shipped code (AGENTS.md › Robustness).
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
#[path = "../support/affinity_docs.rs"]
|
||||
mod affinity_docs;
|
||||
#[path = "../../../affinity/tests/support/text_fixture.rs"]
|
||||
mod text_fixture;
|
||||
|
||||
mod affinity_features;
|
||||
mod affinity_local;
|
||||
mod artboard_click;
|
||||
mod clear_commands;
|
||||
mod compound_attributes;
|
||||
mod dimensions;
|
||||
mod eyedropper_sources;
|
||||
mod find_replace_paras;
|
||||
mod inline_text;
|
||||
mod known_bugs;
|
||||
mod lossy_overwrite;
|
||||
mod model_based;
|
||||
mod param_keys;
|
||||
mod pen_click_after_smooth;
|
||||
mod pen_endpoint_picking;
|
||||
mod ruler_origin;
|
||||
mod selection_commands;
|
||||
mod stroke_visibility;
|
||||
mod text_stroke_scale;
|
||||
mod three_d_light_color;
|
||||
@@ -1,7 +1,5 @@
|
||||
//! Model-based / stateful property tests: random command sequences drawn from the registry, with
|
||||
//! structural invariants checked after every step and history/serialization invariants at the end.
|
||||
// Integration tests: unwrapping and panicking on failure is fine here, unlike in shipped code (AGENTS.md › Robustness).
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
use proptest::prelude::*;
|
||||
use serde_json::json;
|
||||
@@ -1,6 +1,5 @@
|
||||
//! A caller's params are checked against the command's description, but a journal replays as it
|
||||
//! was recorded (#1442).
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
use serde_json::json;
|
||||
use vectorcraft_engine::{Session, check_params};
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//! A click after a smooth anchor: the new corner has no handles, so the segment curves from the previous anchor's side only.
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
use serde_json::json;
|
||||
use vectorcraft_doc::NodeKind;
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//! Original tiny-geometry controls for Pen endpoint/Alt integration with continue-any-path.
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
use serde_json::json;
|
||||
use vectorcraft_doc::{Node, NodeId, NodeKind};
|
||||
@@ -1,5 +1,4 @@
|
||||
//! #1212: ruler coordinates are saved metadata, independent of the artwork's coordinates.
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
use serde_json::{Value, json};
|
||||
use vectorcraft_doc::RulerMode;
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//! Selection command results and validation for agent callers (#784).
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
use serde_json::{Value, json};
|
||||
use vectorcraft_doc::NodeId;
|
||||
@@ -1,5 +1,4 @@
|
||||
//! Painting a previously unpainted zero-width stroke restores the existing 1 pt default.
|
||||
#![allow(clippy::unwrap_used)]
|
||||
|
||||
use serde_json::json;
|
||||
use vectorcraft_doc::NodeId;
|
||||
@@ -1,6 +1,5 @@
|
||||
//! A stroke weight set on type is a document-space weight, whether the type was enlarged by its
|
||||
//! font size or by a transform (issue #3241).
|
||||
#![allow(clippy::unwrap_used, clippy::panic)]
|
||||
|
||||
use serde_json::json;
|
||||
use vectorcraft_doc::{NodeId, NodeKind};
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//! Colored 3D lighting remains a live command and survives native and vector output.
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
use serde_json::{Value, json};
|
||||
use vectorcraft_doc::{Document, Node, NodeId};
|
||||
use vectorcraft_engine::Session;
|
||||
Reference in New Issue
Block a user