1 2 3 4 5 6 7 8 9 10 11 12 13 14
mod point; #[cfg(test)] mod test { use std::sync::Arc; use super::point::{Line, Point}; #[test] fn line() { let point = Arc::new(Point { x: 10, y: 25 }); let line = Line { start: Arc::clone(&point), end: point }; assert_eq!(line.start.x, 10); } }