| 1 | const std = @import("std"); |
| 2 | const expectEqual = std.testing.expectEqual; |
| 3 | |
| 4 | const Point = struct { x: i32, y: i32 }; |
| 5 | |
| 6 | test "anonymous struct literal" { |
| 7 | const pt: Point = .{ |
| 8 | .x = 13, |
| 9 | .y = 67, |
| 10 | }; |
| 11 | try expectEqual(13, pt.x); |
| 12 | try expectEqual(67, pt.y); |
| 13 | } |
| 14 | |
| 15 | // test |