//! returns: 0 //! Test nested record equality. record Point { x: i32, y: i32, } record Circle { center: Point, radius: u32, } fn testNestedEqual() -> bool { let c1: Circle = Circle { center: Point { x: 10, y: 20 }, radius: 5, }; let c2: Circle = Circle { center: Point { x: 10, y: 20 }, radius: 5, }; return c1 == c2; } fn testNestedNotEqualCenter() -> bool { let c1: Circle = Circle { center: Point { x: 10, y: 20 }, radius: 5, }; let c2: Circle = Circle { center: Point { x: 15, y: 20 }, radius: 5, }; return c1 != c2; } fn testNestedNotEqualRadius() -> bool { let c1: Circle = Circle { center: Point { x: 10, y: 20 }, radius: 5, }; let c2: Circle = Circle { center: Point { x: 10, y: 20 }, radius: 10, }; return c1 != c2; } @default fn main() -> i32 { assert testNestedEqual(); assert testNestedNotEqualCenter(); assert testNestedNotEqualRadius(); return 0; }