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
@@ -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