Use tests module

This commit is contained in:
numzero 2024-11-07 01:40:08 +03:00
parent 9fc5dfb2e1
commit 2652b21280

View File

@ -267,8 +267,9 @@ impl Rect {
}
#[cfg(test)]
mod tests {
use super::*;
use crate::types::ray;
#[cfg(test)]
use glam::vec3;
#[test]
@ -309,3 +310,4 @@ fn test_rect() {
assert_eq!(r.trace_out_of(ray(vec3(1., 1., 1.), vec3(0., -1., 0.))), Some(4.));
assert_eq!(r.trace_out_of(ray(vec3(2., 3., 2.), vec3(1., 1., 1.))), Some(0.));
}
}