added tests

This commit is contained in:
Jimmi Holst Christensen 2019-03-08 13:42:55 +01:00 committed by Andrew Kelley
parent 2d7f0ca387
commit 357813b193
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -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);
}