mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 21:08:36 +00:00
add test coverage for fixed bug. closes #5508
This commit is contained in:
parent
ffdce5f98c
commit
680d79ebf9
@ -603,3 +603,9 @@ test "@typeInfo decls ignore dependency loops" {
|
||||
};
|
||||
_ = S.foo;
|
||||
}
|
||||
|
||||
test "type info of tuple of string literal default value" {
|
||||
const struct_field = @typeInfo(@TypeOf(.{"hi"})).Struct.fields[0];
|
||||
const value = @ptrCast(*align(1) const *const [2:0]u8, struct_field.default_value.?).*;
|
||||
comptime std.debug.assert(value[0] == 'h');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user