v2 / vlib / v / tests / interop_test.c.v
18 lines · 14 sloc · 354 bytes · a87a4d73b9ab25cfff0822f4e94cf2a2d9e64323
Raw
1// Not real external functions, so we won't call them
2// We just want to make sure they compile
3
4struct Foo {}
5
6fn C.a(a string, b i32) f32
7fn C.b(a &voidptr)
8fn C.c(a string, b ...string) string
9fn C.d(a ...int)
10
11// TODO: Should this be allowed?
12fn C.g(string, ...int)
13fn C.h(&int)
14
15fn test_null() {
16 np := C.NULL
17 assert typeof(np).name == 'voidptr'
18}
19