add test for previous commit

This commit is contained in:
Andrew Kelley 2018-08-25 17:28:30 -04:00
parent 61c0c6d502
commit 2cce171448

View File

@ -939,6 +939,15 @@ test "fmt.format" {
try testFmt("struct: Struct{ .field = 42 }\n", "struct: {}\n", value);
try testFmt("struct: Struct{ .field = 42 }\n", "struct: {}\n", &value);
}
{
const Enum = enum {
One,
Two,
};
const value = Enum.Two;
try testFmt("enum: Enum.Two\n", "enum: {}\n", value);
try testFmt("enum: Enum.Two\n", "enum: {}\n", &value);
}
{
var buf1: [32]u8 = undefined;
const value: f32 = 1.34;