v2 / vlib / v / tests / c_structs / cstruct_alias_test.c.v
15 lines · 11 sloc · 187 bytes · dbc6b50cda7524c70160db55fb3201ce0f776d83
Raw
1#include "@VMODROOT/cstruct.h"
2
3struct C.TestAlias {
4}
5
6type Foo = C.TestAlias
7
8fn call() ?Foo {
9 return Foo{}
10}
11
12fn test_main() {
13 a := call()
14 assert a?.str() == 'Foo(C.TestAlias{})'
15}
16