mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
added tests
This commit is contained in:
parent
2d7f0ca387
commit
357813b193
@ -299,3 +299,17 @@ test "type info: optional field unwrapping" {
|
||||
|
||||
_ = field.offset orelse 0;
|
||||
}
|
||||
|
||||
test "type info: pass to function" {
|
||||
_ = passTypeInfo(@typeInfo(void));
|
||||
_ = comptime passTypeInfo(@typeInfo(void));
|
||||
}
|
||||
|
||||
fn passTypeInfo(comptime info: TypeInfo) type {
|
||||
return void;
|
||||
}
|
||||
|
||||
test "type info: TypeId -> TypeInfo impl cast" {
|
||||
_ = passTypeInfo(TypeId.Void);
|
||||
_ = comptime passTypeInfo(TypeId.Void);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user