std.json: stringify enum literals (#16742)

This commit is contained in:
Philipp Lühmann
2023-08-09 01:26:46 +02:00
committed by GitHub
parent 36c57c3ba1
commit d34201c849
2 changed files with 7 additions and 1 deletions

View File

@@ -172,6 +172,11 @@ test "stringify enums" {
try testStringify("\"bar\"", E.bar, .{});
}
test "stringify enum literals" {
try testStringify("\"foo\"", .foo, .{});
try testStringify("\"bar\"", .bar, .{});
}
test "stringify tagged unions" {
const T = union(enum) {
nothing,