1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
mod point; #[cfg(test)] mod test { use super::point::{Line, Point2D}; #[test] fn line() { let line = Line { start: Point2D { x: 10, y: 25 }, end: Point2D { x: 42, y: 47 }, }; assert_eq!(line.start.x, 10); assert_eq!(line.end.y, 47); } }