diff options
Diffstat (limited to 'v_windows/v/vlib/v/tests/interop_test.v')
-rw-r--r-- | v_windows/v/vlib/v/tests/interop_test.v | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/v_windows/v/vlib/v/tests/interop_test.v b/v_windows/v/vlib/v/tests/interop_test.v new file mode 100644 index 0000000..f8e1310 --- /dev/null +++ b/v_windows/v/vlib/v/tests/interop_test.v @@ -0,0 +1,23 @@ +// Not real external functions, so we won't call them +// We just want to make sure they compile + +struct Foo {} + +fn C.a(a string, b int) f32 +fn C.b(a &voidptr) +fn C.c(a string, b ...string) string +fn C.d(a ...int) + +fn JS.e(a string, b ...string) int +fn JS.f(a &Foo) + +// TODO: Should this be allowed? + +fn C.g(string, ...int) +fn C.h(&int) +fn JS.i(...string) + +fn test_null() { + np := C.NULL + assert typeof(np).name == 'voidptr' +} |