diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 1911520f5ca..022c8179683 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -174,23 +174,12 @@ jobs: env: # `--cfg=web_sys_unstable_apis` mirrors the `[build]` section of `.cargo/config.toml` RUSTFLAGS: "-Dwarnings --cfg=web_sys_unstable_apis" - run: cargo test --all-features - - # The plain `cargo test` above only covers the workspace's default members, which leave these out - - name: 🧪 Run document migration tests - env: - RUSTFLAGS: "-Dwarnings --cfg=web_sys_unstable_apis" + # The desktop crates need CEF, and `third-party-licenses` only pulls it in through its `desktop` feature, so it runs on its own without `--all-features` run: >- - cargo test --all-features - --package migration-core - --package migration-runner - --package migration-formats - --package migration-nodes - --package migration-snapshot - --package document-graph-storage - --package document-format - --package graphene-cli - --package regression + cargo test --workspace --all-features + --exclude 'graphite-desktop*' + --exclude third-party-licenses + && cargo test --package third-party-licenses # Render the documents of the regression corpus and compare them with their reference images regression-corpus: diff --git a/node-graph/nodes/vector/src/vector_nodes.rs b/node-graph/nodes/vector/src/vector_nodes.rs index f475bf2cd07..3fc58f32455 100644 --- a/node-graph/nodes/vector/src/vector_nodes.rs +++ b/node-graph/nodes/vector/src/vector_nodes.rs @@ -4296,34 +4296,6 @@ mod test { assert_eq!(positions, [DVec2::new(-15., -13.), DVec2::new(25., -13.), DVec2::new(25., 27.), DVec2::new(-15., 27.)]); } - #[test] - fn vector_to_points_and_open_ends_keep_point_attributes() { - use core_types::list::{ATTR_DEPTH, ATTR_HEADING}; - - // A trunk with a branch to the left, placed 100 px to the right - let tree = crate::turtle::turtle_path("F[+F]F", 10., 90., "FG", "f").with_attribute(ATTR_TRANSFORM, DAffine2::from_translation(DVec2::new(100., 0.))); - - let points = super::vector_to_points((), tree.clone()); - assert_eq!(points.iter_element_values().count(), 4); - assert_eq!( - points.iter_attribute_values::(ATTR_DEPTH).map(|depths| depths.copied().collect::>()), - Some(vec![0, 0, 1, 0]) - ); - - // The root and both tips, but not the junction where the branch leaves the trunk - let ends = super::open_ends((), tree); - let positions: Vec = ends.iter_element_values().copied().collect(); - assert_eq!(positions, [DVec2::new(100., 0.), DVec2::new(90., -10.), DVec2::new(100., -20.)]); - assert_eq!( - ends.iter_attribute_values::(ATTR_HEADING).map(|headings| headings.copied().collect::>()), - Some(vec![-90., 180., -90.]) - ); - - // A closed path has no open ends - let square = crate::turtle::turtle_path("F+F+F+F", 10., 90., "FG", "f"); - assert_eq!(super::open_ends((), square).len(), 0); - } - fn convex_hull_of(bezpath: BezPath, transform: DAffine2, curvature: f64) -> Item { let hull = super::convex_hull((), create_vector_item(bezpath, transform), item(curvature)); assert_eq!(hull.attribute_cloned_or_default::(ATTR_TRANSFORM), transform, "the hull should keep its item's transform");