| 1 | const std = @import("std"); |
| 2 | const expectEqual = std.testing.expectEqual; |
| 3 | |
| 4 | test "packed struct equality" { |
| 5 | const S = packed struct { |
| 6 | a: u4, |
| 7 | b: u4, |
| 8 | }; |
| 9 | const x: S = .{ .a = 1, .b = 2 }; |
| 10 | const y: S = .{ .b = 2, .a = 1 }; |
| 11 | try expectEqual(x, y); |
| 12 | } |
| 13 | |
| 14 | // test |