Commit 2cce171448

Andrew Kelley <superjoe30@gmail.com>
2018-08-25 23:28:30
add test for previous commit
1 parent 61c0c6d
Changed files (1)
std
std/fmt/index.zig
@@ -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;