summaryrefslogtreecommitdiff
path: root/examples/01-struct/output/rust/src/lib.rs
blob: fb8a5b60beed4e364134bf06b5a30b240392e455 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mod point;

#[cfg(test)]
mod test {
    use super::point::Point;

    #[test]
    fn point_fields() {
        let point: Point = Point { x: 10, y: 25 };
        let x: i32 = point.x;
        let y: i32 = point.y;
        assert_eq!(x, 10);
        assert_eq!(y, 25);
    }
}