nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
tests: adds tests for the FFI with C
[nit.git]
/
tests
/
test_ffi_c_types_import.nit
diff --git a/tests/test_ffi_c_types_import.nit
b/tests/test_ffi_c_types_import.nit
new file mode 100644
(file)
index 0000000..
40f91e6
--- /dev/null
+++ b/
tests/test_ffi_c_types_import.nit
@@ -0,0
+1,8
@@
+import test_ffi_c_types
+
+fun foo( b : B ) : A `{
+ printf( "%d %d\n", b->super.x, b->w );
+ return (struct s_a*)b;
+`}
+
+foo( new B ).p