summaryrefslogtreecommitdiff
path: root/examples/03-struct-generic/output/rust/src/lib.rs
blob: 75ae1f1330c6299b46d7b03f663847c80402cca1 (plain)
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);
    }
}