refactor(three-d): move tests_*.rs to tests/<topic>.rs

This commit is contained in:
aiongg
2026-10-26 18:26:59 +00:00
parent 52fb56b438
commit 5a84d5a8e4
6 changed files with 10 additions and 12 deletions
-8
View File
@@ -15,10 +15,6 @@ pub use shading::{LightGradient, RgbGradient, ShadeGradient};
mod lights;
pub use lights::{Light, Lights, MAX_LIGHTS};
mod caps;
#[cfg(test)]
mod tests_lighting;
#[cfg(test)]
mod tests_multiple_lights;
use vectorcraft_geom::{BezPath, ParamCurve, PathData, Point, Rect, Vec2, kurbo::ParamCurveDeriv};
@@ -595,10 +591,6 @@ pub fn revolve(path: &PathData, bounds: Rect, options: Revolve) -> Result<Vec<Fa
Ok(faces)
}
#[cfg(test)]
mod tests_caps;
#[cfg(test)]
mod tests_smooth;
#[cfg(test)]
mod tests;
+6
View File
@@ -1,4 +1,10 @@
use super::*;
mod lighting;
mod multiple_lights;
mod caps;
mod smooth;
#[test]
fn light_orbits_and_handle_projection_match_the_shading_direction_on_both_sides() {
for rotation in [-170.0f64, -45.0, 0.0, 83.0, 167.0] {
@@ -1,4 +1,4 @@
use super::*;
use crate::*;
fn cylinder() -> (PathData, Rect) {
let mut path = BezPath::new();
@@ -1,4 +1,4 @@
use super::*;
use crate::*;
#[test]
fn color_combines_with_neutral_ambient_before_channel_clamping() {
@@ -1,4 +1,4 @@
use super::*;
use crate::*;
#[test]
fn directional_lights_add_before_saturation_and_ambient_is_added_once() {
@@ -1,4 +1,4 @@
use super::*;
use crate::*;
fn path(d: &str) -> PathData {
PathData::from_bezpath(&BezPath::from_svg(d).unwrap())