| ... | @@ -939,6 +939,15 @@ test "fmt.format" { | ... | @@ -939,6 +939,15 @@ test "fmt.format" { |
| 939 | try testFmt("struct: Struct{ .field = 42 }\n", "struct: {}\n", value); | 939 | try testFmt("struct: Struct{ .field = 42 }\n", "struct: {}\n", value); |
| 940 | try testFmt("struct: Struct{ .field = 42 }\n", "struct: {}\n", &value); | 940 | try testFmt("struct: Struct{ .field = 42 }\n", "struct: {}\n", &value); |
| 941 | } | 941 | } |
| | 942 | { |
| | 943 | const Enum = enum { |
| | 944 | One, |
| | 945 | Two, |
| | 946 | }; |
| | 947 | const value = Enum.Two; |
| | 948 | try testFmt("enum: Enum.Two\n", "enum: {}\n", value); |
| | 949 | try testFmt("enum: Enum.Two\n", "enum: {}\n", &value); |
| | 950 | } |
| 942 | { | 951 | { |
| 943 | var buf1: [32]u8 = undefined; | 952 | var buf1: [32]u8 = undefined; |
| 944 | const value: f32 = 1.34; | 953 | const value: f32 = 1.34; |