VectorCraft: An open-source, vector art tool written by scratch in pure Rust
refactor(doc): move tests_*.rs to tests/<topic>.rs
aiongg371c93ffe5b1
diff --git a/crates/doc/src/lib.rs b/crates/doc/src/lib.rsindex 6cd0e3aec..b06ed03f2 100644--- a/crates/doc/src/lib.rs+++ b/crates/doc/src/lib.rs@@ -2383,10 +2383,3 @@ impl Document {#[cfg(test)]mod tests;--#[cfg(test)]-mod tests_lookups;-#[cfg(test)]-mod tests_slices;-#[cfg(test)]-mod tests_units;diff --git a/crates/doc/src/tests.rs b/crates/doc/src/tests.rsindex 7bb94b3fa..6ef4260a9 100644--- a/crates/doc/src/tests.rs+++ b/crates/doc/src/tests.rs@@ -1,6 +1,10 @@use super::*;use vectorcraft_geom::shapes;+mod lookups;+mod slices;+mod units;+/// Zooming in on an inch ruler divided the inch into tenths (#2827). Its steps below an inch/// are binary fractions now, and the minor ticks between them stay binary too; every other/// unit is still read in tenths.diff --git a/crates/doc/src/tests_lookups.rs b/crates/doc/src/tests/lookups.rssimilarity index 99%rename from crates/doc/src/tests_lookups.rsrename to crates/doc/src/tests/lookups.rsindex 0fda214ee..2f83b65c5 100644--- a/crates/doc/src/tests_lookups.rs+++ b/crates/doc/src/tests/lookups.rs@@ -2,7 +2,7 @@//! with the one-id ones on nested trees with missing and duplicated ids, and the edits of many nodes//! ([`Document::remove_many`], `wrap`, `insert_beside`) leave the tree that `remove`, `insert` and//! `move_node` leave one node at a time.-use super::*;+use crate::*;use vectorcraft_geom::shapes;/// Layers with paths and groups nested `depth` deep; every 7th id is reused (a damaged file), sodiff --git a/crates/doc/src/tests_slices.rs b/crates/doc/src/tests/slices.rssimilarity index 100%rename from crates/doc/src/tests_slices.rsrename to crates/doc/src/tests/slices.rsdiff --git a/crates/doc/src/tests_units.rs b/crates/doc/src/tests/units.rssimilarity index 98%rename from crates/doc/src/tests_units.rsrename to crates/doc/src/tests/units.rsindex 5b3319f18..909a0adf3 100644--- a/crates/doc/src/tests_units.rs+++ b/crates/doc/src/tests/units.rs@@ -3,7 +3,7 @@use proptest::prelude::*;-use super::Unit;+use crate::Unit;#[test]fn every_unit_round_trips_through_its_field_text() {@@ -133,7 +133,7 @@ fn a_negative_operand_after_an_operator_is_a_sign() {assert_eq!(Unit::Points.parse("5 - -3"), Some(8.0));assert_eq!(Unit::Points.parse("5+-3"), Some(2.0));assert_eq!(Unit::Points.parse("10-2"), Some(8.0));- assert_eq!(super::parse_number("90*-1"), Some(-90.0));+ assert_eq!(crate::parse_number("90*-1"), Some(-90.0));}#[test]