| ... | ... | @@ -963,6 +963,27 @@ test "zig fmt: allowzero pointer" { |
| 963 | 963 | ); |
| 964 | 964 | } |
| 965 | 965 | |
| 966 | test "zig fmt: empty enum decls" { |
| 967 | try testCanonical( |
| 968 | \\const A = enum {}; |
| 969 | \\const B = enum(u32) {}; |
| 970 | \\const C = extern enum(c_int) {}; |
| 971 | \\const D = packed enum(u8) {}; |
| 972 | \\ |
| 973 | ); |
| 974 | } |
| 975 | |
| 976 | test "zig fmt: empty union decls" { |
| 977 | try testCanonical( |
| 978 | \\const A = union {}; |
| 979 | \\const B = union(enum) {}; |
| 980 | \\const C = union(Foo) {}; |
| 981 | \\const D = extern union {}; |
| 982 | \\const E = packed union {}; |
| 983 | \\ |
| 984 | ); |
| 985 | } |
| 986 | |
| 966 | 987 | test "zig fmt: enum literal" { |
| 967 | 988 | try testCanonical( |
| 968 | 989 | \\const x = .hi; |