zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

test_tagName.zig (219B) - Raw


      1 const std = @import("std");
      2 const expect = std.testing.expect;
      3 
      4 const Small2 = union(enum) {
      5     a: i32,
      6     b: bool,
      7     c: u8,
      8 };
      9 test "@tagName" {
     10     try expect(std.mem.eql(u8, @tagName(Small2.a), "a"));
     11 }
     12 
     13 // test