mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-28 03:37:00 -06:00
refactor(three-d): move tests_*.rs to tests/<topic>.rs
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
-1
@@ -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())
|
||||
Reference in New Issue
Block a user