]> Nishi Git Mirror - gwion.git/commitdiff
:white_check_mark: Testing
authorfennecdjay <astor.jeremie@wanadoo.fr>
Mon, 21 Oct 2019 18:30:06 +0000 (20:30 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Mon, 21 Oct 2019 18:30:06 +0000 (20:30 +0200)
tests/import/fptr_tmpl.c [new file with mode: 0644]

diff --git a/tests/import/fptr_tmpl.c b/tests/import/fptr_tmpl.c
new file mode 100644 (file)
index 0000000..28b0b35
--- /dev/null
@@ -0,0 +1,21 @@
+#include "gwion_util.h"
+#include "gwion_ast.h"
+#include "oo.h"
+#include "vm.h"
+#include "env.h"
+#include "type.h"
+#include "object.h"
+#include "instr.h"
+#include "gwion.h"
+#include "value.h"
+#include "operator.h"
+#include "import.h"
+
+static MFUN(test_func) { puts("test"); }
+GWION_IMPORT(typedef_test) {
+  Type t_func_typedef;
+  GWI_OB((t_func_typedef = gwi_mk_type(gwi, "FuncTypedef", SZ_INT , NULL)))
+  GWI_BB(gwi_fptr_ini(gwi, "int", "<~A~>test"))
+  GWI_OB(gwi_fptr_end(gwi, 0))
+  return GW_OK;
+}