const std = @import("std"); const expect = std.testing.expect; const Color = enum { auto, off, on }; test "enum literals with switch" { const color = Color.off; const result = switch (color) { .auto, .on => false, .off => true, }; expect(result); }